You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2005/09/07 19:26:06 UTC
svn commit: r279381 - in /cocoon/blocks:
portal-sample/trunk/WEB-INF/xconf/cocoon-portal-cowarp.xconf
portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf
portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java
Author: cziegeler
Date: Wed Sep 7 10:25:50 2005
New Revision: 279381
URL: http://svn.apache.org/viewcvs?rev=279381&view=rev
Log:
Correct sample configuration
Removed:
cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-cowarp.xconf
Modified:
cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf
cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java
Modified: cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf?rev=279381&r1=279380&r2=279381&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf (original)
+++ cocoon/blocks/portal-sample/trunk/WEB-INF/xconf/cocoon-portal-sample.xconf Wed Sep 7 10:25:50 2005
@@ -30,6 +30,39 @@
if you use the portal for your own projects that you
remove all unused stuff from the configuration!
-->
+ <component role="org.osoco.cowarp.ApplicationManager"
+ class="org.osoco.cowarp.impl.StandardApplicationManager"/>
+ <!-- This security handler uses OJB and the hsqldb for the authentication: -->
+ <component role="org.osoco.cowarp.SecurityHandler/portal"
+ class="org.apache.cocoon.portal.security.DBSecurityHandler"/>
+ <!-- If you want to use a pipeline for the authentication use this configuration:
+ <component role="org.osoco.cowarp.SecurityHandler/portal"
+ class="org.osoco.cowarp.impl.PipelineSecurityHandler">
+ <authentication-resource>cocoon:raw:/sunrise-authuser</authentication-resource>
+ </component>
+ -->
+ <component role="org.osoco.cowarp.Application/portal"
+ class="org.osoco.cowarp.portal.StandardPortalApplication"
+ security-handler="portal">
+ <profiles>
+ <copletbasedata-global-load uri="cocoon:raw:/load-global-profile?profile=copletbasedata"/>
+ <copletdata-global-load uri="cocoon:raw:/load-global-profile?profile=copletdata"/>
+ <copletdata-role-load uri="cocoon:raw:/load-role-profile?profile=copletdata"/>
+ <copletdata-user-load uri="cocoon:raw:/load-user-profile?profile=copletdata"/>
+ <copletinstancedata-global-load uri="cocoon:raw:/load-global-profile?profile=copletinstancedata"/>
+ <copletinstancedata-role-load uri="cocoon:raw:/load-role-profile?profile=copletinstancedata"/>
+ <copletinstancedata-user-load uri="cocoon:raw:/load-user-profile?profile=copletinstancedata"/>
+ <copletinstancedata-user-save uri="cocoon:raw:/save-user-profile?profile=copletinstancedata"/>
+ <layout-global-load uri="cocoon:raw:/load-global-profile?profile=layout"/>
+ <layout-role-load uri="cocoon:raw:/load-role-profile?profile=layout"/>
+ <layout-user-load uri="cocoon:raw:/load-user-profile?profile=layout"/>
+ <layout-user-save uri="cocoon:raw:/save-user-profile?profile=layout"/>
+ </profiles>
+ </component>
+ <component class="org.apache.cocoon.portal.profile.impl.GroupBasedProfileManager" logger="portal" role="org.apache.cocoon.portal.profile.ProfileManager/Cowarp">
+ <parameter name="userinfo-provider" value="org.osoco.cowarp.portal.UserInfoProviderImpl"/>
+ </component>
+
<component class="org.apache.cocoon.portal.impl.PortalServiceImpl" logger="portal" role="org.apache.cocoon.portal.PortalService">
<portals>
<portal name="portal">
Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java?rev=279381&r1=279380&r2=279381&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/coplet/impl/DefaultCopletFactory.java Wed Sep 7 10:25:50 2005
@@ -63,7 +63,7 @@
protected static long idCounter = System.currentTimeMillis();
- /* (non-Javadoc)
+ /**
* @see org.apache.cocoon.portal.coplet.CopletFactory#prepare(org.apache.cocoon.portal.coplet.CopletData)
*/
public void prepare(CopletData copletData)
@@ -87,7 +87,7 @@
}
}
- /* (non-Javadoc)
+ /**
* @see org.apache.cocoon.portal.coplet.CopletFactory#prepare(org.apache.cocoon.portal.coplet.CopletInstanceData)
*/
public void prepare(CopletInstanceData copletInstanceData)
@@ -112,7 +112,7 @@
}
- /* (non-Javadoc)
+ /**
* @see org.apache.cocoon.portal.coplet.CopletFactory#newInstance(org.apache.cocoon.portal.coplet.CopletData)
*/
public CopletInstanceData newInstance(CopletData copletData)
@@ -170,7 +170,7 @@
return instance;
}
- /* (non-Javadoc)
+ /**
* @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
*/
public void service(ServiceManager manager) throws ServiceException {
@@ -178,7 +178,7 @@
this.storeSelector = (ServiceSelector)this.manager.lookup( AspectDataStore.ROLE+"Selector" );
}
- /* (non-Javadoc)
+ /**
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose() {
@@ -189,53 +189,51 @@
}
}
- /* (non-Javadoc)
+ /**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration)
throws ConfigurationException {
final Configuration[] copletsConf = configuration.getChild("coplets").getChildren("coplet");
- if ( copletsConf != null ) {
- for(int i=0; i < copletsConf.length; i++ ) {
- DefaultCopletDescription desc = new DefaultCopletDescription();
- DefaultCopletDescription instanceDesc = new DefaultCopletDescription();
- final String name = copletsConf[i].getAttribute("name");
-
- // unique test
- if ( this.coplets.get(name) != null) {
- throw new ConfigurationException("Coplet name must be unique. Double definition for " + name);
- }
- desc.setName(copletsConf[i].getAttribute("name"));
- instanceDesc.setName(copletsConf[i].getAttribute("name"));
- instanceDesc.setCreateId(copletsConf[i].getAttributeAsBoolean("create-id", true));
-
- // and now the aspects
- Configuration[] aspectsConf = copletsConf[i].getChild("coplet-data-aspects").getChildren("aspect");
- if (aspectsConf != null) {
- for(int m=0; m < aspectsConf.length; m++) {
- AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]);
- desc.addAspectDescription( adesc );
- }
+ for(int i=0; i < copletsConf.length; i++ ) {
+ DefaultCopletDescription desc = new DefaultCopletDescription();
+ DefaultCopletDescription instanceDesc = new DefaultCopletDescription();
+ final String name = copletsConf[i].getAttribute("name");
+
+ // unique test
+ if ( this.coplets.get(name) != null) {
+ throw new ConfigurationException("Coplet name must be unique. Double definition for " + name);
+ }
+ desc.setName(name);
+ instanceDesc.setName(name);
+ instanceDesc.setCreateId(copletsConf[i].getAttributeAsBoolean("create-id", true));
+
+ // and now the aspects
+ Configuration[] aspectsConf = copletsConf[i].getChild("coplet-data-aspects").getChildren("aspect");
+ if (aspectsConf != null) {
+ for(int m=0; m < aspectsConf.length; m++) {
+ AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]);
+ desc.addAspectDescription( adesc );
}
+ }
- // and now the aspects of the instances
- aspectsConf = copletsConf[i].getChild("coplet-instance-data-aspects").getChildren("aspect");
- if (aspectsConf != null) {
- for(int m=0; m < aspectsConf.length; m++) {
- AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]);
- instanceDesc.addAspectDescription( adesc );
- }
+ // and now the aspects of the instances
+ aspectsConf = copletsConf[i].getChild("coplet-instance-data-aspects").getChildren("aspect");
+ if (aspectsConf != null) {
+ for(int m=0; m < aspectsConf.length; m++) {
+ AspectDescription adesc = DefaultAspectDescription.newInstance(aspectsConf[m]);
+ instanceDesc.addAspectDescription( adesc );
}
-
- DefaultAspectDataHandler handler = new DefaultAspectDataHandler(desc, this.storeSelector);
- DefaultAspectDataHandler instanceHandler = new DefaultAspectDataHandler(instanceDesc, this.storeSelector);
- this.coplets.put(desc.getName(), new Object[] {desc, handler, instanceHandler});
- this.descriptions.add(desc);
}
+
+ DefaultAspectDataHandler handler = new DefaultAspectDataHandler(desc, this.storeSelector);
+ DefaultAspectDataHandler instanceHandler = new DefaultAspectDataHandler(instanceDesc, this.storeSelector);
+ this.coplets.put(name, new Object[] {desc, handler, instanceHandler});
+ this.descriptions.add(desc);
}
}
- /* (non-Javadoc)
+ /**
* @see org.apache.cocoon.portal.coplet.CopletFactory#remove(org.apache.cocoon.portal.coplet.CopletInstanceData)
*/
public void remove(CopletInstanceData copletInstanceData)