JBoss Portal SVN: r8988 - in branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model: content and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 08:53:13 -0500 (Sat, 17 Nov 2007)
New Revision: 8988
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/content/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/content/WindowContent.java
Log:
improve get markup of window
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/content/WindowContent.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/content/WindowContent.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/content/WindowContent.java 2007-11-17 13:53:13 UTC (rev 8988)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.model.content;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class WindowContent
+{
+
+ /** . */
+ private final long expirationMillis;
+
+ /** . */
+ private final String title;
+
+ /** . */
+ private final String markup;
+
+
+ public WindowContent(long expirationMillis, String title, String markup)
+ {
+ this.expirationMillis = expirationMillis;
+ this.title = title;
+ this.markup = markup;
+ }
+
+ public long getExpirationMillis()
+ {
+ return expirationMillis;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public String getMarkup()
+ {
+ return markup;
+ }
+}
16 years, 10 months
JBoss Portal SVN: r8987 - in branches/UIServer: uiserver/src/main/org/jboss/portal/presentation/server and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 08:53:01 -0500 (Sat, 17 Nov 2007)
New Revision: 8987
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
Log:
improve get markup of window
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 13:50:07 UTC (rev 8986)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 13:53:01 UTC (rev 8987)
@@ -26,6 +26,7 @@
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.model.state.ModelLoader;
import org.jboss.portal.core.controller.Controller;
import org.jboss.portal.core.controller.ControllerContext;
@@ -115,12 +116,9 @@
public void setProcessor(Processor processor)
{
this.processor = processor;
- }
+ }
- /**
- *
- */
- public String getMarkup(RequestContext context, UIWindow window) throws Exception
+ public WindowContent render(RequestContext context, UIWindow window) throws Exception
{
PortalObjectId windowId = null;
RenderWindowCommand rwc = new RenderWindowCommand(windowId);
@@ -135,7 +133,8 @@
{
if (response instanceof MarkupResponse)
{
- return ((MarkupResponse)response).getContent();
+ MarkupResponse markupResp = (MarkupResponse)response;
+ return new WindowContent(-1, markupResp.getTitle(), markupResp.getContent());
}
else if (response != null)
{
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17 13:50:07 UTC (rev 8986)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17 13:53:01 UTC (rev 8987)
@@ -24,6 +24,7 @@
import org.jboss.portal.presentation.RequestContext;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.model.state.ModelLoader;
/**
@@ -46,7 +47,7 @@
* @return the markup of the window
* @throws Exception for now a generic exception
*/
- String getMarkup(RequestContext context, UIWindow window) throws Exception;
+ WindowContent render(RequestContext context, UIWindow window) throws Exception;
/**
*
16 years, 10 months
JBoss Portal SVN: r8986 - in branches/UIServer: uiserver/src/main/org/jboss/portal/presentation/controller and 3 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-17 08:50:07 -0500 (Sat, 17 Nov 2007)
New Revision: 8986
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
Log:
integration
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -22,13 +22,17 @@
******************************************************************************/
package org.jboss.portal.core.presentation.server;
+import java.util.List;
+import java.util.Map;
+import java.util.Iterator;
+import java.util.ArrayList;
+
import java.io.InputStream;
import org.apache.log4j.Logger;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.jems.as.system.AbstractJBossService;
-import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.server.RequestControllerDispatcher;
import org.jboss.portal.server.ServerException;
import org.jboss.portal.server.RequestController;
@@ -40,11 +44,17 @@
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
import org.jboss.portal.presentation.action.server.ErrorResponse;
import org.jboss.portal.presentation.action.server.RedirectResponse;
import org.jboss.portal.presentation.action.server.StreamResponse;
+import org.jboss.portal.presentation.model.*;
+import org.jboss.portal.theme.page.WindowContext;
+import org.jboss.portal.theme.page.WindowResult;
+
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
@@ -86,10 +96,9 @@
{
try
{
- ProcessorResponse response = null;
-
+ ProcessorResponse response = null;
//For now, just for prototype sake just use the existing Controller to produce the outcome
- requestContext.getInvocation().setHandler(new RequestControllerDispatcher(this.requestController));
+ /*requestContext.getInvocation().setHandler(new RequestControllerDispatcher(this.requestController));
requestContext.getInvocation().invokeNext();
//Get access to the core Portal objects to be used after the execution of the incoming Portal request
@@ -100,12 +109,23 @@
if(task.equals("aggregate"))
{
//Handle page aggregation and sending result back to the client
- MarkupInfo markupInfo = (MarkupInfo)invocation.getResponse().getContentInfo();
- PageResult pageResult = (PageResult)invocation.getServerContext().getClientRequest().getAttribute("pageResult");
- String contentType = markupInfo.getContentType() + "; charset=" + markupInfo.getCharset();
+ MarkupInfo markupMetaData = (MarkupInfo)invocation.getResponse().getContentInfo();
+ String contentType = markupMetaData.getContentType() + "; charset=" + markupMetaData.getCharset();
+ String characterSet = markupMetaData.getCharset();
+ PageResult pageResult = (PageResult)invocation.getServerContext().getClientRequest().getAttribute("pageResult");
+ //Setup the state of the UIObjectTree
+ UIContext uiContext = requestContext.getUIContext();
+ List<UIWindow> uiWindows = this.getUIWindows(uiContext, pageResult.getWindowContextMap());
+
+ //Setup the ShowUIObjectResponse object to be returned
+ ShowUIObjectResponse showResponse = new ShowUIObjectResponse(
+ ((ViewUIObjectAction)request.getAction()).getTargetId());
+
//Generate the response to be sent back for processing by the Presentation Framework
- response = new ProcessorResponse(null);
+ response = new ProcessorResponse(showResponse);
+ response.setContentType(contentType);
+ response.setCharacterSet(characterSet);
}
else if(task.equals("stream"))
{
@@ -128,13 +148,19 @@
Integer errorCode = (Integer)invocation.getServerContext().getClientRequest().getAttribute("errorCode");
ErrorResponse errorResponse = new ErrorResponse(errorCode.intValue());
response = new ProcessorResponse(errorResponse);
- }
-
+ }*/
+ ServerAction serverAction = request.getAction();
+ if(serverAction instanceof ViewUIObjectAction)
+ {
+ ViewUIObjectAction viewAction = (ViewUIObjectAction)serverAction;
+ ShowUIObjectResponse actionResponse = new ShowUIObjectResponse(viewAction.getTargetId());
+ response = new ProcessorResponse(actionResponse);
+ }
return response;
}
catch(Exception e)
{
throw new ServerException(e);
}
- }
+ }
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -36,6 +36,7 @@
import org.jboss.portal.presentation.action.server.GetActivation;
import org.jboss.portal.presentation.action.server.PostActivation;
import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
+import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
import org.jboss.portal.presentation.model.UIPortal;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPage;
@@ -97,6 +98,7 @@
//Process the response from the Processor
ServerResponse serverResponse = processorResponse.getResponse();
+ this.handle(serverResponse);
}
catch(Exception e)
{
@@ -106,6 +108,23 @@
/**
*
+ * @param serverResponse
+ * @throws ServerException
+ */
+ private void handle(ServerResponse serverResponse) throws ServerException
+ {
+ if(serverResponse instanceof ShowUIObjectResponse)
+ {
+ ShowUIObjectResponse response = (ShowUIObjectResponse)serverResponse;
+
+ //Setup the objects in the UIObjectTree
+
+ //Populate the state of the Windows in the Page that is being displayed
+ }
+ }
+
+ /**
+ *
*
*/
public void start()
@@ -156,10 +175,10 @@
}
UIPortal targetPortal = this.getTargetPortal(requestContext,portalRequestPath);
- UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
+ UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
if(targetPortalObject instanceof UIPage)
- {
+ {
serverAction = new ViewUIObjectAction(targetPortalObject.getId());
}
else if(targetPortalObject instanceof UIWindow)
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -24,6 +24,7 @@
import java.util.Map;
import java.util.Iterator;
+import java.util.List;
import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPortal;
@@ -109,7 +110,7 @@
public void setModelLoader(ModelLoader modelLoader)
{
this.modelLoader = modelLoader;
- }
+ }
/**
*
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -46,6 +46,11 @@
/**
*
*/
+ private String markup = null;
+
+ /**
+ *
+ */
public Mode getMode()
{
return this.mode;
@@ -77,6 +82,22 @@
/**
*
+ */
+ public String getMarkup()
+ {
+ return markup;
+ }
+
+ /**
+ *
+ */
+ public void setMarkup(String markup)
+ {
+ this.markup = markup;
+ }
+
+ /**
+ *
* @param <T>
* @param type
* @return
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -50,5 +50,5 @@
*
* @return
*/
- public ModelLoader getModelLoader();
+ public ModelLoader getModelLoader();
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -54,4 +54,16 @@
* @param mode
*/
public void setMode(Mode mode);
+
+ /**
+ *
+ * @return
+ */
+ public String getMarkup();
+
+ /**
+ *
+ * @param markup
+ */
+ public void setMarkup(String markup);
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-17 13:43:55 UTC (rev 8985)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-17 13:50:07 UTC (rev 8986)
@@ -31,8 +31,18 @@
*
*/
public class ProcessorResponse implements Serializable
-{
+{
/**
+ * type of content to be sent back to the client
+ */
+ private String contentType = null;
+
+ /**
+ * character set to be used
+ */
+ private String characterSet = null;
+
+ /**
* The ServerResponse generated by processing the ProcessorRequest by the Processor
*/
private ServerResponse response = null;
@@ -63,5 +73,41 @@
public void setResponse(ServerResponse response)
{
this.response = response;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getCharacterSet()
+ {
+ return characterSet;
+ }
+
+ /**
+ *
+ * @param characterSet
+ */
+ public void setCharacterSet(String characterSet)
+ {
+ this.characterSet = characterSet;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getContentType()
+ {
+ return contentType;
+ }
+
+ /**
+ *
+ * @param contentType
+ */
+ public void setContentType(String contentType)
+ {
+ this.contentType = contentType;
}
}
16 years, 10 months
JBoss Portal SVN: r8985 - in branches/UIServer/uiserver/src/main/org/jboss/portal/presentation: model and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 08:43:55 -0500 (Sat, 17 Nov 2007)
New Revision: 8985
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
Log:
remove title on UIWindow
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 12:29:15 UTC (rev 8984)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 13:43:55 UTC (rev 8985)
@@ -46,11 +46,6 @@
/**
*
*/
- private String title = null;
-
- /**
- *
- */
public Mode getMode()
{
return this.mode;
@@ -59,14 +54,6 @@
/**
*
*/
- public String getTitle()
- {
- return this.title;
- }
-
- /**
- *
- */
public WindowState getWindowState()
{
return this.windowState;
@@ -83,14 +70,6 @@
/**
*
*/
- public void setTitle(String title)
- {
- this.title = title;
- }
-
- /**
- *
- */
public void setWindowState(WindowState windowState)
{
this.windowState = windowState;
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 12:29:15 UTC (rev 8984)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 13:43:55 UTC (rev 8985)
@@ -35,18 +35,6 @@
*
* @return
*/
- public String getTitle();
-
- /**
- *
- * @param title
- */
- public void setTitle(String title);
-
- /**
- *
- * @return
- */
public WindowState getWindowState();
/**
16 years, 10 months
JBoss Portal SVN: r8984 - branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 07:29:15 -0500 (Sat, 17 Nov 2007)
New Revision: 8984
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
Log:
basic impl of window render in PS
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 11:28:58 UTC (rev 8983)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 12:29:15 UTC (rev 8984)
@@ -27,6 +27,13 @@
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.model.state.ModelLoader;
+import org.jboss.portal.core.controller.Controller;
+import org.jboss.portal.core.controller.ControllerContext;
+import org.jboss.portal.core.controller.ControllerResponse;
+import org.jboss.portal.core.model.portal.command.render.RenderWindowCommand;
+import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.content.WindowRendition;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -34,6 +41,11 @@
*/
public class PresentationServerImpl implements PresentationServer
{
+
+
+ /** . */
+ private Controller controller;
+
/**
*
*/
@@ -109,7 +121,29 @@
*
*/
public String getMarkup(RequestContext context, UIWindow window) throws Exception
- {
+ {
+ PortalObjectId windowId = null;
+ RenderWindowCommand rwc = new RenderWindowCommand(windowId);
+ ControllerContext ctx = new ControllerContext(context.getInvocation(), controller);
+ WindowRendition rendition = rwc.render(ctx);
+ if (rendition != null)
+ {
+ ControllerResponse response = rendition.getControllerResponse();
+
+ // Null means we skip the window
+ if (response != null)
+ {
+ if (response instanceof MarkupResponse)
+ {
+ return ((MarkupResponse)response).getContent();
+ }
+ else if (response != null)
+ {
+ // It may be an error, handle it
+ }
+ }
+ }
+
return null;
}
}
16 years, 10 months
JBoss Portal SVN: r8983 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 06:28:58 -0500 (Sat, 17 Nov 2007)
New Revision: 8983
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java
Log:
Generified XMLTools
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java 2007-11-17 11:26:11 UTC (rev 8982)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java 2007-11-17 11:28:58 UTC (rev 8983)
@@ -447,9 +447,8 @@
throw new IllegalArgumentException();
}
Properties props = new Properties();
- for (Object o : getChildren(propertiesElt, "entry"))
+ for (Element entryElt : getChildren(propertiesElt, "entry"))
{
- Element entryElt = (Element)o;
String key = entryElt.getAttribute("key");
String value = asString(entryElt);
props.put(key, value);
16 years, 10 months
JBoss Portal SVN: r8982 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 06:26:11 -0500 (Sat, 17 Nov 2007)
New Revision: 8982
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java
Log:
Generified XMLTools
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java 2007-11-17 11:19:42 UTC (rev 8981)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/xml/XMLTools.java 2007-11-17 11:26:11 UTC (rev 8982)
@@ -358,7 +358,7 @@
* @return an iterator for the designated elements
* @throws IllegalArgumentException if the element is null or the name is null
*/
- public static Iterator getChildrenIterator(Element element, String name) throws IllegalArgumentException
+ public static Iterator<Element> getChildrenIterator(Element element, String name) throws IllegalArgumentException
{
return getChildren(element, name).iterator();
}
@@ -373,7 +373,7 @@
* @return an iterator for the designated elements
* @throws IllegalArgumentException if the element is null or the name is null
*/
- public static Iterator getChildrenIterator(Element element, String uri, String name) throws IllegalArgumentException
+ public static Iterator<Element> getChildrenIterator(Element element, String uri, String name) throws IllegalArgumentException
{
return getChildren(element, uri, name).iterator();
}
@@ -386,7 +386,7 @@
* @return a list of elements
* @throws IllegalArgumentException if the element is null or the name is null
*/
- public static List getChildren(Element element, String name) throws IllegalArgumentException
+ public static List<Element> getChildren(Element element, String name) throws IllegalArgumentException
{
return getChildren(element, null, name);
}
@@ -401,7 +401,7 @@
* @return a list of elements
* @throws IllegalArgumentException if the element is null or the name is null
*/
- public static List getChildren(Element element, String uri, String name) throws IllegalArgumentException
+ public static List<Element> getChildren(Element element, String uri, String name) throws IllegalArgumentException
{
if (element == null)
{
@@ -411,7 +411,7 @@
{
throw new IllegalArgumentException("No name specified");
}
- ArrayList result = new ArrayList();
+ ArrayList<Element> result = new ArrayList<Element>();
NodeList list = element.getChildNodes();
for (int i = 0; i < list.getLength(); i++)
{
@@ -447,9 +447,9 @@
throw new IllegalArgumentException();
}
Properties props = new Properties();
- for (Iterator i = getChildren(propertiesElt, "entry").iterator(); i.hasNext();)
+ for (Object o : getChildren(propertiesElt, "entry"))
{
- Element entryElt = (Element)i.next();
+ Element entryElt = (Element)o;
String key = entryElt.getAttribute("key");
String value = asString(entryElt);
props.put(key, value);
16 years, 10 months
JBoss Portal SVN: r8981 - modules/common/trunk/common/src/main/java/org/jboss/portal/common/p3p.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 06:19:42 -0500 (Sat, 17 Nov 2007)
New Revision: 8981
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/p3p/P3PConstants.java
Log:
on the P3PConstants, make private the constants that are used internally and should not be exposed
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/p3p/P3PConstants.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/p3p/P3PConstants.java 2007-11-16 22:48:16 UTC (rev 8980)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/p3p/P3PConstants.java 2007-11-17 11:19:42 UTC (rev 8981)
@@ -30,10 +30,35 @@
public final class P3PConstants
{
+ // Postal
+ private static final String POSTAL_NAME = "postal.name";
+ private static final String POSTAL_STREET = "postal.street";
+ private static final String POSTAL_CITY = "postal.city";
+ private static final String POSTAL_STATEPROV = "postal.stateprov";
+ private static final String POSTAL_POSTALCODE = "postal.postalcode";
+ private static final String POSTAL_COUNTRY = "postal.country";
+ private static final String POSTAL_ORGANIZATION = "postal.organization";
+
+ // Telecom
+ private static final String TELECOM_TELEPHONE = "telecom.telephone.";
+ private static final String TELECOM_FAX = "telecom.fax.";
+ private static final String TELECOM_MOBILE = "telecom.mobile.";
+ private static final String TELECOM_PAGER = "telecom.pager.";
+ private static final String INTCODE = "intcode";
+ private static final String LOCCODE = "loccode";
+ private static final String NUMBER = "number";
+ private static final String EXT = "ext";
+ private static final String COMMENT = "comment";
+
+ // Online
+ private static final String ONLINE_URI = "online.uri";
+ private static final String ONLINE_EMAIL = "online.email";
+
/*
* User information attribute names (PLT.D in the portlet spec) that are defined in P3P spec.
*/
+ //
public static final String INFO_USER_BDATE = "user.bdate";
public static final String INFO_USER_GENDER = "user.gender";
public static final String INFO_USER_EMPLOYER = "user.employer";
@@ -46,30 +71,6 @@
public static final String INFO_USER_NAME_SUFFIX = "user.name.suffix";
public static final String INFO_USER_NAME_NICKNAME = "user.name.nickName";
- // Postal
- public static final String POSTAL_NAME = "postal.name";
- public static final String POSTAL_STREET = "postal.street";
- public static final String POSTAL_CITY = "postal.city";
- public static final String POSTAL_STATEPROV = "postal.stateprov";
- public static final String POSTAL_POSTALCODE = "postal.postalcode";
- public static final String POSTAL_COUNTRY = "postal.country";
- public static final String POSTAL_ORGANIZATION = "postal.organization";
-
- // Telecom
- public static final String TELECOM_TELEPHONE = "telecom.telephone.";
- public static final String TELECOM_FAX = "telecom.fax.";
- public static final String TELECOM_MOBILE = "telecom.mobile.";
- public static final String TELECOM_PAGER = "telecom.pager.";
- public static final String INTCODE = "intcode";
- public static final String LOCCODE = "loccode";
- public static final String NUMBER = "number";
- public static final String EXT = "ext";
- public static final String COMMENT = "comment";
-
- // Online
- public static final String ONLINE_URI = "online.uri";
- public static final String ONLINE_EMAIL = "online.email";
-
// User home
public static final String INFO_USER_HOME_PREFIX = "user.home-info.";
public static final String INFO_USER_HOME_INFO_POSTAL_NAME = INFO_USER_HOME_PREFIX + POSTAL_NAME;
16 years, 10 months
JBoss Portal SVN: r8980 - branches/JBoss_Portal_Branch_2_6/wsrp.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2007-11-16 17:48:16 -0500 (Fri, 16 Nov 2007)
New Revision: 8980
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/.classpath
Log:
I add xercesImpl.jar. This project need of this library
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/.classpath 2007-11-16 22:47:02 UTC (rev 8979)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/.classpath 2007-11-16 22:48:16 UTC (rev 8980)
@@ -35,5 +35,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-jsr168api-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/xercesImpl.jar"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
16 years, 10 months
JBoss Portal SVN: r8979 - branches/JBoss_Portal_Branch_2_6/theme.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2007-11-16 17:47:02 -0500 (Fri, 16 Nov 2007)
New Revision: 8979
Modified:
branches/JBoss_Portal_Branch_2_6/theme/.classpath
Log:
I remove xalan.jar. It is not more used in this version
Modified: branches/JBoss_Portal_Branch_2_6/theme/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/theme/.classpath 2007-11-16 22:46:16 UTC (rev 8978)
+++ branches/JBoss_Portal_Branch_2_6/theme/.classpath 2007-11-16 22:47:02 UTC (rev 8979)
@@ -3,7 +3,6 @@
<classpathentry kind="src" path="src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
- <classpathentry kind="lib" path="/tools/lib/xalan.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
16 years, 10 months