cziegeler 2004/01/27 02:37:54
Modified: src/blocks/portal/java/org/apache/cocoon/portal/pluto/om WebApplicationDefinitionImpl.java servletdefinitionmapping.xml src/blocks/portal/java/org/apache/cocoon/portal/layout AbstractLayout.java Removed: src/blocks/portal/java/org/apache/cocoon/portal/pluto/om TagDefinition.java src/blocks/portal/java/org/apache/cocoon/portal/pluto Deploy.java Log: Cleaning up Revision Changes Path 1.4 +64 -88 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/om/WebApplicationDefinitionImpl.java Index: WebApplicationDefinitionImpl.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/om/WebApplicationDefinitionImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- WebApplicationDefinitionImpl.java 27 Jan 2004 08:05:34 -0000 1.3 +++ WebApplicationDefinitionImpl.java 27 Jan 2004 10:37:35 -0000 1.4 @@ -63,6 +63,7 @@ import org.apache.pluto.om.portlet.PortletApplicationDefinition; import org.apache.pluto.om.servlet.ServletDefinitionList; import org.apache.pluto.om.servlet.WebApplicationDefinition; +import org.apache.cocoon.portal.pluto.om.common.ObjectIDImpl; import org.apache.cocoon.portal.pluto.om.common.ParameterSetImpl; import org.apache.cocoon.portal.pluto.om.common.SecurityRoleSetImpl; import org.apache.cocoon.portal.pluto.om.common.Support; @@ -80,40 +81,25 @@ implements WebApplicationDefinition, Support { - // <not used variables - only for castor> - public String icon; - public String distributable; - public String sessionConfig; - public String welcomeFileList; - public String errorPage; - public String taglib; - public String resourceRef; - public String securityConstraint; - public String loginConfig; - public String securityRole; - public String envEntry; - public String ejbRef; - // </not used variables - only for castor> - - private String contextPath; private DescriptionSet descriptions = new DescriptionSetImpl(); private DisplayNameSet displayNames = new DisplayNameSetImpl(); private String id = ""; private ParameterSet initParams = new ParameterSetImpl(); + /** The object id */ private ObjectID objectId; private Collection servletMappings = new ArrayList(); private ServletDefinitionList servlets = new ServletDefinitionListImpl(); private SecurityRoleSet securityRoles = new SecurityRoleSetImpl(); - private TagDefinition castorTagDefinition = new TagDefinition(); - // WebApplicationDefinition implementation. - + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getId() + */ public ObjectID getId() { - if (objectId==null) { - objectId = org.apache.cocoon.portal.pluto.om.common.ObjectIDImpl.createFromString(id); + if (this.objectId == null) { + this.objectId = ObjectIDImpl.createFromString(id); } - return objectId; + return this.objectId; } /* (non-Javadoc) @@ -123,40 +109,52 @@ return displayNames.get(locale); } - public Description getDescription(Locale locale) - { + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getDescription(java.util.Locale) + */ + public Description getDescription(Locale locale) { return descriptions.get(locale); } - public ParameterSet getInitParameterSet() - { + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getInitParameterSet() + */ + public ParameterSet getInitParameterSet() { return initParams; } - public ServletDefinitionList getServletDefinitionList() - { + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getServletDefinitionList() + */ + public ServletDefinitionList getServletDefinitionList() { return servlets; } - public ServletContext getServletContext(ServletContext servletContext) - { + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getServletContext(javax.servlet.ServletContext) + */ + public ServletContext getServletContext(ServletContext servletContext) { return servletContext.getContext(contextPath); } + /* (non-Javadoc) + * @see org.apache.pluto.om.servlet.WebApplicationDefinition#getContextRoot() + */ public String getContextRoot() { - return contextPath; } - // Support implementation. - - public void postBuild(Object parameter) throws Exception - { + /* (non-Javadoc) + * @see org.apache.cocoon.portal.pluto.om.common.Support#postBuild(java.lang.Object) + */ + public void postBuild(Object parameter) throws Exception { // not needed in this implementation } - public void postLoad(Object parameter) throws Exception - { + /* (non-Javadoc) + * @see org.apache.cocoon.portal.pluto.om.common.Support#postLoad(java.lang.Object) + */ + public void postLoad(Object parameter) throws Exception { Vector structure = (Vector)parameter; PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0); @@ -169,13 +167,17 @@ } - public void postStore(Object parameter) throws Exception - { + /* (non-Javadoc) + * @see org.apache.cocoon.portal.pluto.om.common.Support#postStore(java.lang.Object) + */ + public void postStore(Object parameter) throws Exception { ((Support)servlets).postStore(this); } - public void preBuild(Object parameter) throws Exception - { + /* (non-Javadoc) + * @see org.apache.cocoon.portal.pluto.om.common.Support#preBuild(java.lang.Object) + */ + public void preBuild(Object parameter) throws Exception { Vector structure = (Vector)parameter; PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0); String contextString = (String)structure.get(1); @@ -197,8 +199,10 @@ ((Support)portletApplication).preBuild(structure3); } - public void preStore(Object parameter) throws Exception - { + /* (non-Javadoc) + * @see org.apache.cocoon.portal.pluto.om.common.Support#preStore(java.lang.Object) + */ + public void preStore(Object parameter) throws Exception { Vector structure = (Vector)parameter; PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0); @@ -209,6 +213,11 @@ // additional methods. + public void setCastorId(String id) { + this.id = id; + objectId = null; + } + public String getCastorId() { if (id.length() > 0) { return getId().toString(); @@ -217,81 +226,48 @@ } } - public Collection getCastorInitParams() - { + public Collection getCastorInitParams() { return(ParameterSetImpl)initParams; } - public Collection getCastorServlets() - { + public Collection getCastorServlets() { return(ServletDefinitionListImpl)servlets; } - public Collection getCastorDisplayNames() - { + public Collection getCastorDisplayNames() { return(DisplayNameSetImpl)displayNames; } - public Collection getCastorDescriptions() - { + public Collection getCastorDescriptions() { return(DescriptionSetImpl)descriptions; } - public SecurityRoleSet getSecurityRoles() - { + public SecurityRoleSet getSecurityRoles() { return securityRoles; } - public Collection getServletMappings() - { + public Collection getServletMappings() { return servletMappings; } - public void setCastorId(String id) { - setId(id); - } - protected void setContextRoot(String contextPath) - { + protected void setContextRoot(String contextPath) { this.contextPath = contextPath; } - public void setDescriptions(DescriptionSet descriptions) - { + public void setDescriptions(DescriptionSet descriptions) { this.descriptions = descriptions; } - public void setDisplayNames(DisplayNameSet displayNames) - { + public void setDisplayNames(DisplayNameSet displayNames) { this.displayNames = displayNames; } - public void setCastorDescriptions(DescriptionSet castorDescriptions) - { + public void setCastorDescriptions(DescriptionSet castorDescriptions) { this.descriptions = castorDescriptions; } - public void setCastorDisplayNames(DisplayNameSet castorDisplayNames) - { + public void setCastorDisplayNames(DisplayNameSet castorDisplayNames) { this.displayNames = castorDisplayNames; } - public void setId(String id) - { - this.id = id; - objectId = null; - } - - /** - * @return - */ - public TagDefinition getCastorTagDefinition() { - return castorTagDefinition; - } - - /** - * @param definition - */ - public void setCastorTagDefinition(TagDefinition definition) { - castorTagDefinition = definition; - } } 1.3 +0 -41 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/om/servletdefinitionmapping.xml Index: servletdefinitionmapping.xml =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/pluto/om/servletdefinitionmapping.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- servletdefinitionmapping.xml 27 Jan 2004 08:05:34 -0000 1.2 +++ servletdefinitionmapping.xml 27 Jan 2004 10:37:37 -0000 1.3 @@ -146,7 +146,6 @@ <field name="castorId" type="java.lang.String"> <bind-xml name="id" node="attribute"/> </field> - <field name="castorDisplayNames" type="org.apache.cocoon.portal.pluto.om.common.DisplayNameImpl" collection="collection"> @@ -174,52 +173,12 @@ required="true"> <bind-xml name="servlet-mapping" node="element"/> </field> - - <field name="castorTagDefinition" type="org.apache.cocoon.portal.pluto.om.TagDefinition"> - <bind-xml name="taglib" node="element" /> - </field> - - <!-- only for completion, not used in class file --> - <field name="icon" transient="true" direct="true"> - <bind-xml name="icon" node="element"/> - </field> - <field name="distributable" transient="true" direct="true"> - <bind-xml name="distributable" node="element"/> - </field> - <field name="sessionConfig" transient="true" direct="true"> - <bind-xml name="session-config" node="element"/> - </field> - <field name="welcomeFileList" transient="true" direct="true"> - <bind-xml name="welcome-file-list" node="element"/> - </field> - <field name="errorPage" transient="true" direct="true"> - <bind-xml name="error-page" node="element"/> - </field> - - <field name="resourceRef" transient="true" direct="true"> - <bind-xml name="resource-ref" node="element"/> - </field> - <field name="securityConstraint" transient="true" direct="true"> - <bind-xml name="security-constraint" node="element"/> - </field> - <field name="loginConfig" transient="true" direct="true"> - <bind-xml name="login-config" node="element"/> - </field> - <!--field name="securityRole" transient="false" direct="true"> - <bind-xml name="security-role" node="element"/> - </field--> <field name="securityRoles" transient="false" type="org.apache.cocoon.portal.pluto.om.common.SecurityRoleImpl" required="false" collection="collection"> <bind-xml name="security-role" node="element"/> - </field> - <field name="envEntry" transient="true" direct="true"> - <bind-xml name="env-entry" node="element"/> - </field> - <field name="ejbRef" transient="true" direct="true"> - <bind-xml name="ejb-ref" node="element"/> </field> </class> 1.11 +3 -5 cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java Index: AbstractLayout.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- AbstractLayout.java 2 Sep 2003 08:34:17 -0000 1.10 +++ AbstractLayout.java 27 Jan 2004 10:37:47 -0000 1.11 @@ -53,9 +53,7 @@ import java.util.Map; import org.apache.cocoon.portal.factory.impl.AbstractProducible; -import org.apache.commons.collections.SequencedHashMap; - - +import org.apache.commons.collections.map.ListOrderedMap; /** * @@ -72,7 +70,7 @@ protected Item parent; - protected Map parameters = new SequencedHashMap(); + protected Map parameters = new ListOrderedMap(); /* (non-Javadoc) * @see org.apache.cocoon.portal.layout.Parameters#getParameters()