Author: ate
Date: Tue Oct 28 15:25:50 2008
New Revision: 708701
URL: http://svn.apache.org/viewvc?rev=708701&view=rev
Log:
JS2-871 - Upgrade Pluto container to version 2.0
See: http://issues.apache.org/jira/browse/JS2-871
- resolving TODOs in ExtendedDescriptorServiceImpl.upgrade method
Modified:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/ExtendedDescriptorServiceImpl.java
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
Modified:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/ExtendedDescriptorServiceImpl.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/ExtendedDescriptorServiceImpl.java?rev=708701&r1=708700&r2=708701&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/ExtendedDescriptorServiceImpl.java
(original)
+++
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/ExtendedDescriptorServiceImpl.java
Tue Oct 28 15:25:50 2008
@@ -20,6 +20,8 @@
import java.io.InputStream;
import java.io.OutputStream;
+import javax.xml.namespace.QName;
+
import org.apache.jetspeed.om.portlet.ContainerRuntimeOption;
import org.apache.jetspeed.om.portlet.DisplayName;
import org.apache.jetspeed.om.portlet.EventDefinition;
@@ -104,8 +106,8 @@
jcpm.setPortalManaged(cpm.isPortalManaged());
for (org.apache.pluto.om.portlet.Description desc :
cpm.getDescriptions())
{
- Description jdesc = jcpm.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jcpm.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
for (org.apache.pluto.om.portlet.CustomWindowState cws :
pa.getCustomWindowStates())
@@ -113,19 +115,30 @@
CustomWindowState jcws =
jpa.addCustomWindowState(cws.getWindowState());
for (org.apache.pluto.om.portlet.Description desc :
cws.getDescriptions())
{
- Description jdesc = jcws.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jcws.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
for (org.apache.pluto.om.portlet.EventDefinition ed :
pa.getEventDefinitions())
{
- EventDefinition jed = jpa.addEventDefinition(ed.getName());
+ EventDefinition jed = null;
+ if (ed.getQName() != null)
+ {
+ jed = jpa.addEventDefinition(ed.getQName());
+ }
+ else
+ {
+ jed =jpa.addEventDefinition(ed.getName());
+ }
jed.setValueType(ed.getValueType());
- // TODO: 2.2 - aliases, qnames ?
+ for (QName alias : ed.getAliases())
+ {
+ jed.addAlias(alias);
+ }
for (org.apache.pluto.om.portlet.Description desc :
ed.getDescriptions())
{
- Description jdesc = jed.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jed.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
for (org.apache.pluto.om.portlet.FilterMapping fm :
pa.getFilterMappings())
@@ -142,13 +155,13 @@
jf.setFilterClass(f.getFilterClass());
for (org.apache.pluto.om.portlet.Description desc :
f.getDescriptions())
{
- Description jdesc = jf.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jf.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
for (org.apache.pluto.om.portlet.DisplayName dn :
f.getDisplayNames())
{
- DisplayName jdn = jf.addDisplayName(dn.getDisplayName());
- // TODO: 2.2 - lang, locale
+ DisplayName jdn = jf.addDisplayName(dn.getLang());
+ jdn.setDisplayName(dn.getDisplayName());
}
for (org.apache.pluto.om.portlet.InitParam ip : f.getInitParams())
{
@@ -156,8 +169,8 @@
jip.setParamValue(ip.getParamValue());
for (org.apache.pluto.om.portlet.Description desc :
ip.getDescriptions())
{
- Description jdesc =
jip.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure
if there is a good reason
+ Description jdesc = jip.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
for (String lc : f.getLifecycles())
@@ -170,33 +183,43 @@
Listener jl = jpa.addListener(l.getListenerClass());
for (org.apache.pluto.om.portlet.Description desc :
l.getDescriptions())
{
- Description jdesc = jl.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jl.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
for (org.apache.pluto.om.portlet.DisplayName dn :
l.getDisplayNames())
{
- DisplayName jdn = jl.addDisplayName(dn.getDisplayName());
- // TODO: 2.2 - lang, locale
+ DisplayName jdn = jl.addDisplayName(dn.getLang());
+ jdn.setDisplayName(dn.getDisplayName());
}
}
for (org.apache.pluto.om.portlet.PublicRenderParameter prd :
pa.getPublicRenderParameters())
- {
-
- PublicRenderParameter jprp =
jpa.addPublicRenderParameter(prd.getName(), prd.getIdentifier());
+ {
+ PublicRenderParameter jprp = null;
+ if (prd.getQName() != null)
+ {
+ jprp = jpa.addPublicRenderParameter(prd.getQName(),
prd.getIdentifier());
+ }
+ else
+ {
+ jprp = jpa.addPublicRenderParameter(prd.getName(),
prd.getIdentifier());
+ }
+ for (QName alias : prd.getAliases())
+ {
+ jprp.addAlias(alias);
+ }
for (org.apache.pluto.om.portlet.Description desc :
prd.getDescriptions())
{
- Description jdesc = jprp.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
- }
- // TODO: 2.2 aliases, qname
+ Description jdesc = jprp.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
+ }
}
for (org.apache.pluto.om.portlet.SecurityConstraint sc :
pa.getSecurityConstraints())
{
SecurityConstraint jsc =
jpa.addSecurityConstraint(sc.getUserDataConstraint().getTransportGuarantee());
for (org.apache.pluto.om.portlet.DisplayName dn :
sc.getDisplayNames())
{
- DisplayName jdn = jsc.addDisplayName(dn.getDisplayName());
- // TODO: 2.2 - lang, locale
+ DisplayName jdn = jsc.addDisplayName(dn.getLang());
+ jdn.setDisplayName(dn.getDisplayName());
}
for (String portletName : sc.getPortletNames())
{
@@ -208,8 +231,8 @@
UserAttribute jua = jpa.addUserAttribute(ua.getName());
for (org.apache.pluto.om.portlet.Description desc :
ua.getDescriptions())
{
- Description jdesc = jua.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jua.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
return jpa;
@@ -231,13 +254,13 @@
}
for (org.apache.pluto.om.portlet.Description desc :
pd.getDescriptions())
{
- Description jdesc = jpd.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if there
is a good reason
+ Description jdesc = jpd.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
for (org.apache.pluto.om.portlet.DisplayName dn : pd.getDisplayNames())
{
- DisplayName jdn = jpd.addDisplayName(dn.getDisplayName());
- // TODO: 2.2 - lang, locale
+ DisplayName jdn = jpd.addDisplayName(dn.getLang());
+ jdn.setDisplayName(dn.getDisplayName());
}
for (org.apache.pluto.om.portlet.InitParam ip : pd.getInitParams())
{
@@ -245,11 +268,10 @@
jip.setParamValue(ip.getParamValue());
for (org.apache.pluto.om.portlet.Description desc :
ip.getDescriptions())
{
- Description jdesc = jip.addDescription(desc.getDescription());
- // TODO: 2.2 - there is no setLang or setLocale, not sure if
there is a good reason
+ Description jdesc = jip.addDescription(desc.getLang());
+ jdesc.setDescription(desc.getDescription());
}
}
- // TODO: 2.2 still relevant? jpd.addLanguage()
for (org.apache.pluto.om.portlet.SecurityRoleRef srr :
pd.getSecurityRoleRefs())
{
SecurityRoleRef jsrr = jpd.addSecurityRoleRef(srr.getRoleName());
@@ -259,11 +281,17 @@
{
jpd.addSupportedLocale(locale);
}
+ // TODO: jpd.addLanguage()
for (org.apache.pluto.om.portlet.EventDefinitionReference ed :
pd.getSupportedProcessingEvents())
{
- jpd.addSupportedProcessingEvent(ed.getName());
- //EventDefinitionReference jedr =
jpd.addSupportedProcessingEvent(ed.getName());
- // TODO: 2.2 qname
+ if (ed.getQName() != null)
+ {
+ jpd.addSupportedProcessingEvent(ed.getQName());
+ }
+ else
+ {
+ jpd.addSupportedProcessingEvent(ed.getName());
+ }
}
for (String sprd : pd.getSupportedPublicRenderParameters())
{
@@ -271,9 +299,14 @@
}
for (org.apache.pluto.om.portlet.EventDefinitionReference ed :
pd.getSupportedPublishingEvents())
{
- jpd.addSupportedPublishingEvent(ed.getName());
- //EventDefinitionReference jedr =
jpd.addSupportedProcessingEvent(ed.getName());
- // TODO: 2.2 qname
+ if (ed.getQName() != null)
+ {
+ jpd.addSupportedPublishingEvent(ed.getQName());
+ }
+ else
+ {
+ jpd.addSupportedPublishingEvent(ed.getName());
+ }
}
for (org.apache.pluto.om.portlet.Supports supports : pd.getSupports())
{
Modified:
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java?rev=708701&r1=708700&r2=708701&view=diff
==============================================================================
---
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
(original)
+++
portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/impl/PublicRenderParameterImpl.java
Tue Oct 28 15:25:50 2008
@@ -57,6 +57,7 @@
public void setQName(QName value)
{
qname = value;
+ name = null;
}
public String getName()
@@ -67,6 +68,7 @@
public void setName(String value)
{
name = value;
+ qname = null;
}
public List<QName> getAliases()
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]