Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-jsf-portlet.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-jsf-portlet.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-jsf-portlet.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-jsf-portlet.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,202 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed Simple JSF Portlet Guide</title> + <subtitle>Documentation for Creating a Simple JSF Portlet</subtitle> + <authors> + <person name="David Le Strat" email="[email protected]" /> + <person name="Philip Mark Donaghy" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Jetspeed Simple JSF Portlet Guide"> + <p> + This guide provides a tutorial for creating a very + simple JSF portlet with one template in the portlet view mode. + </p> + <subsection name="1. The Portlet Class"> + <p> + Create the file JSFSimplest.java in a directory called + jsf-simplest/WEB-INF/classes: + <source> +public class JSFSimplest extends org.apache.portals.bridges.jsf.FacesPortlet +{ + + public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) + throws javax.portlet.PortletException, java.io.IOException + { + super.doView(request, response); + } +} + </source> + </p> + <p> + Compile the class in the jsf-simplest/WEB-INF/classes directory using the command, + <source> +javac -cp portlet-api-1.0.jar:portals-bridges-jsf-1.0.jar:portals-bridges-common-1.0.jar JSFSimplest.java + </source> + </p> + </subsection> + <subsection name="2. The portlet.xml"> + <p> + Create the file portlet.xml in the jsf-simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app id="jsfsimplest" version="1.0"> + <portlet id="JSFSimplest"> + <portlet-name>JSFSimplestPortlet</portlet-name> + <display-name>JSF Simplest Display Name</display-name> + <portlet-class>JSFSimplest</portlet-class> + <init-param> + <name>ViewPage</name> + <value>/WEB-INF/view/view.jsp</value> + </init-param> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <supported-locale>fr</supported-locale> + <portlet-info> + <title>JSF Simplest Title</title> + <short-title>JSF Simplest Short Title</short-title> + </portlet-info> + </portlet> +</portlet-app>]]> + </source> + </p> + </subsection> + <subsection name="3. The web.xml"> + <p> + Create the file web.xml in the jsf-simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>JSF Simplest</display-name> + <description>The world's simplest JSF portlet</description> + + <!-- Faces Config --> + <context-param> + <param-name>javax.faces.application.CONFIG_FILES</param-name> + <param-value>/WEB-INF/faces-config.xml</param-value> + </context-param> + + <!-- Faces Servlet --> + <servlet> + <servlet-name>Faces Servlet</servlet-name> + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> + </servlet> + + <!-- Faces extension mapping --> + <servlet-mapping> + <servlet-name>Faces Servlet</servlet-name> + <url-pattern>*.jsf</url-pattern> + </servlet-mapping> +</web-app>]]> + </source> + </p> + </subsection> + <subsection name="4. The View"> + <p> + Create the view.jsp file in the jsf-simplest/WEB-INF/view directory. +<source><![CDATA[ +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix='portlet'%> +<portlet:defineObjects/> +<f:view> + <h2>A JSF Portlet</h2> + Hello + <% if ( renderRequest.getUserPrincipal() == null ) { %> + guest + <% } else { %> + <%=renderRequest.getUserPrincipal().getName()%> + <% } %>! +</f:view>]]> +</source> + </p> + </subsection> + <subsection name="5. The faces-config.xml"> + <p> + Create a faces-config.xml file in the jsf-simplest/WEB-INF directory. +<source><![CDATA[ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE faces-config PUBLIC + "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" + "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> + +<faces-config> + + <application> + <locale-config> + <default-locale>en</default-locale> + <supported-locale>fr</supported-locale> + </locale-config> + </application> + +</faces-config>]]> +</source> + </p> + </subsection> + <subsection name="6. The Dependency JARs"> + <p> + Copy the dependencies to the WEB-INF/lib directory. + These jars should be in your Maven repository. If so executing these commands in the lib + directory will set up the dependencies for you. +<source> +ln -s ~/.maven/repository/commons-beanutils/jars/commons-beanutils-1.7.0.jar +ln -s ~/.maven/repository/commons-collections/jars/commons-collections-3.1.jar +ln -s ~/.maven/repository/commons-digester/jars/commons-digester-1.7.jar +ln -s ~/.maven/repository/myfaces/jars/myfaces-api-1.1.0.jar +ln -s ~/.maven/repository/myfaces/jars/myfaces-impl-1.1.0.jar +ln -s ~/.maven/repository/myfaces/jars/tomahawk-1.1.0.jar +ln -s ~/.maven/repository/org.apache.portals.bridges/jars/portals-bridges-jsf-1.0.jar +ln -s ~/.maven/repository/xerces/jars/xerces-2.4.0.jar +ln -s ~/.maven/repository/xml-apis/jars/xml-apis-2.0.2.jar +</source> + </p> + </subsection> + <subsection name="7. The WAR file"> + <p> + From the directory jsf-simplest combine the files above into a war file using the command, + <source> +jar cvf ../jsfsimplest.war . + </source> + </p> + </subsection> + <subsection name="8. Deploy the WAR file"> + <p> + Copy the war file to <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code>. + Jetspeed-2 will deploy the webapp. + </p> + </subsection> + <subsection name="9. The PSML"> + <p> + Create the PSML page using the Jetspeed portlet chooser. Login and click on the + edit page icon. Click on the add portlet icon. + Checkbox and add the JSFSimplestPortlet to your page. + Your user must have the permission to edit pages. The user <code>admin</code> + password + <code>admin</code> has permission to edit all pages. + </p> + </subsection> + </section> + </body> +</document>
Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-portlet.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-portlet.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-portlet.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-portlet.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,159 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed Simple Portlet Guide</title> + <subtitle>Documentation for Creating a Simple Portlet</subtitle> + <authors> + <person name="David Le Strat" email="[email protected]" /> + <person name="Philip Mark Donaghy" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Jetspeed Simple Portlet Guide"> + <p> + This guide provides a tutorial for creating a very + simple portlet. Portlets developers should follow the + steps below. + </p> + <subsection name="1. The Portlet Class"> + <p> + Create the file Simplest.java in a directory called + simplest/WEB-INF/classes: + <source> +public class Simplest extends javax.portlet.GenericPortlet +{ + public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) + throws javax.portlet.PortletException, java.io.IOException + { + response.setContentType("text/html"); + response.getWriter().println("A very simple portlet."); + } +} + </source> + </p> + <p> + Compile the class using the command, + <source> +javac -cp $CATALINA_HOME/shared/lib/portlet-api-1.0.jar Simplest.java + </source> + </p> + </subsection> + <subsection name="2. The portlet.xml"> + <p> + Create the file portlet.xml in the simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app id="simplest" version="1.0"> + <portlet id="Simplest"> + <portlet-name>Simplest</portlet-name> + <display-name>Simple Display Name</display-name> + <portlet-class>Simplest</portlet-class> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <portlet-info> + <title>Simple Title</title> + <short-title>The world's simplest portlet</short-title> + </portlet-info> + </portlet> +</portlet-app>]]> + </source> + </p> + </subsection> + <subsection name="3. The web.xml"> + <p> + Create the file web.xml in the simplest WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>Simplest</display-name> + <description>The world's simplest portlet</description> +</web-app>]]> + </source> + </p> + </subsection> + <subsection name="4. The WAR file"> + <p> + From the directory simplest combine the files above into a war file using the command, + <source> +jar cvf ../simplest.war . + </source> + </p> + </subsection> + <subsection name="5. Deploy the WAR file"> + <p> + Copy the war file to <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code>. Jetspeed-2 + will deploy the webapp. + </p> + </subsection> + <subsection name="6. The PSML"> + <p> + Create the file simplest.psml and copy it to the portal pages directory of your Jetspeed Portal, + <code>$CATALINA_HOME/pages/</code>. + </p> + <p> + <em>Note: If you have different portal pages directory path set by <CODE>psml.pages.path</CODE> property + in <a href="../deployguide/jetspeed-properties.html">Jetspeed Properties</a>, + please use the portal pages directory. + </em> + </p> + <p> + The portlet-app id and the portlet-name are combined to identify the portlet fragment. + Alternatively one can use the portlet chooser by clicking on the edit page icon. + Your user must have the permission to edit pages. The user <code>admin</code> password + <code>admin</code> has permission to edit all pages. The user <code>user</code> + password <code>user</code> has permission to edit the + <a href="http://localhost:8080/jetspeed/portal/anotherdir">[USER 004] PSML Page</a>. + And by default Jetspeed-2 allows newly registered users to add portlets and customize + their home page. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> + <page> + <defaults + skin="orange" + layout-decorator="tigris" + portlet-decorator="tigris" + /> + <title>The simplest portlet in the world</title> + <metadata name="title" xml:lang="fr">La plus simple portlet du monde</metadata> + + <fragment id="simplest" type="layout" name="jetspeed-layouts::VelocityTwoColumns"> + <fragment id="simplest-1" type="portlet" name="simplest::Simplest"> + <property layout="TwoColumns" name="row" value="0" /> + <property layout="TwoColumns" name="column" value="0" /> + </fragment> + </fragment> + + <security-constraints> + <security-constraints-ref>public-view</security-constraints-ref> + </security-constraints> +</page>]]> + </source> + Test the portlet using the + <a href="http://localhost:8080/jetspeed/portal/simplest.psml">simplest.psml</a> in + your browser. + </p> + </subsection> + </section> + </body> +</document> Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-velocity-portlet.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-velocity-portlet.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-velocity-portlet.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/guide-simple-velocity-portlet.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,175 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed Simple Velocity Portlet Guide</title> + <subtitle>Documentation for Creating a Simple Velocity Portlet</subtitle> + <authors> + <person name="David Le Strat" email="[email protected]" /> + <person name="Philip Mark Donaghy" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Jetspeed Simple Velocity Portlet Guide"> + <p> + This guide provides a tutorial for creating a very + simple Velocity portlet with one template in the portlet view mode. + </p> + <subsection name="1. The Portlet Class"> + <p> + Create the file VelocitySimplest.java in a directory called + velocity-simplest/WEB-INF/classes: + <source> +public class VelocitySimplest extends org.apache.portals.bridges.velocity.GenericVelocityPortlet +{ + + public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) + throws javax.portlet.PortletException, java.io.IOException + { + super.doView(request, response); + } +} + </source> + </p> + <p> + Compile the class in the velocity-simplest/WEB-INF/classes directory using the command, + <source> +javac -cp portlet-api-1.0.jar:portals-bridges-velocity-1.0.jar:portals-bridges-common-1.0.jar VelocitySimplest.java + </source> + </p> + </subsection> + <subsection name="2. The portlet.xml"> + <p> + Create the file portlet.xml in the velocity-simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<portlet-app id="velocitysimplest" version="1.0"> + <portlet id="VelocitySimplest"> + <portlet-name>VelocitySimplest</portlet-name> + <display-name>Velocity Simplest Display Name</display-name> + <portlet-class>VelocitySimplest</portlet-class> + <init-param> + <name>ViewPage</name> + <value>/WEB-INF/view/world.vm</value> + </init-param> + <supports> + <mime-type>text/html</mime-type> + <portlet-mode>VIEW</portlet-mode> + </supports> + <supported-locale>en</supported-locale> + <portlet-info> + <title>Velocity Simplest Title</title> + <short-title>Velocity Simplest Short Title</short-title> + </portlet-info> + </portlet> +</portlet-app>]]> + </source> + </p> + </subsection> + <subsection name="3. The web.xml"> + <p> + Create the file web.xml in the velocity-simplest/WEB-INF directory. + <source><![CDATA[ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>Velocity Simplest</display-name> + <description>The world's simplest Velocity portlet</description> + + <!-- Define Velocity Servlet --> + <servlet> + <servlet-name>velocity</servlet-name> + <servlet-class>org.apache.portals.bridges.velocity.BridgesVelocityViewServlet</servlet-class> + </servlet> + + <!-- Map *.vm files to Velocity --> + <servlet-mapping> + <servlet-name>velocity</servlet-name> + <url-pattern>*.vm</url-pattern> + </servlet-mapping> + +</web-app>]]> + </source> + </p> + </subsection> + <subsection name="4. The View"> + <p> + Create the world.vm file in the velocity-simplest/WEB-INF/view directory. Put + whatever content + you desire in it. Notice that the template file is defined in the portlet init + parameter <code> + ViewPage</code>. The objects <a href="http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/PortletConfig.html">PortletConfig</a>, <a href="http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/RenderRequest.html">RenderRequest</a>, and <a href="http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/RenderResponse.html">RenderResponse</a> + are automatically + placed in the Velocity context for use in Velocity templates. Here is a sample + template showing a few of these objects methods and properties. +<source> +$portletConfig.portletName +$portletConfig.portletContext.serverInfo +#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale)) +$renderRequest.portletMode +$renderResponse.namespace +</source> + </p> + </subsection> + <subsection name="5. The Dependency JARs"> + <p> + Copy the commons-beanutils-1.7.0.jar, commons-collections-3.1.jar, + commons-digester-1.7.jar, portals-bridges-velocity-1.0.jar, + velocity-1.4.jar, and velocity-tools-1.1.jar to the velocity-simplest/WEB-INF/lib + directory. IMPORTANT: + Do NOT put the portlet-api-1.0.jar in the war file. If you have already built + Jetspeed these + jars should be in your Maven repository. If so executing these commands in the lib + directory will set up the dependencies for you. +<source> +ln -s ~/.maven/repository/commons-beanutils/jars/commons-beanutils-1.7.0.jar +ln -s ~/.maven/repository/commons-collections/jars/commons-collections-3.1.jar +ln -s ~/.maven/repository/commons-digester/jars/commons-digester-1.7.jar +ln -s ~/.maven/repository/org.apache.portals.bridges/jars/portals-bridges-velocity-1.0.jar +ln -s ~/.maven/repository/velocity/jars/velocity-1.4.jar +ln -s ~/.maven/repository/velocity-tools/jars/velocity-tools-1.1.jar +</source> + </p> + </subsection> + <subsection name="6. The WAR file"> + <p> + From the directory velocity-simplest combine the files above into a war file using the command, + <source> +jar cvf ../velocitysimplest.war . + </source> + </p> + </subsection> + <subsection name="7. Deploy the WAR file"> + <p> + Copy the war file to <code>$CATALINA_HOME/webapps/jetspeed/WEB-INF/deploy</code>. + Jetspeed-2 will deploy the webapp. + </p> + </subsection> + <subsection name="8. The PSML"> + <p> + Create the PSML page using the Jetspeed portlet chooser. Login and click on the + edit page icon. + Your user must have the permission to edit pages. The user <code>admin</code> + password + <code>admin</code> has permission to edit all pages. + </p> + </subsection> + </section> + </body> +</document> Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/hierarchy.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/hierarchy.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/hierarchy.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/hierarchy.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,172 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed 2 Security - Hierarchy Management</title> + <authors> + <person name="David Le Strat" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Hierarchy Management Overview"> + <p> + Two hierarchy resolution strategies are supported for authorization decisions: + <ul> + <li> + Hierarchy resolution by Generalization: This is the default hierarchy resolution in Jetspeed. If a hierarchy uses a generalization + strategy, each role is more general than the previous one. For instance, if a user has the role [roleA.roleB.roleC] then + <code>user.getSubject().getPrincipals()</code> + returns: + <ul> + <li>/role/roleA</li> + <li>/role/roleA/roleB</li> + <li>/role/roleA/roleB/roleC</li> + </ul> + </li> + <li> + Hierarchy resolution by Aggregation: If a hierarchy uses a aggregation strategy, the higher role is responsible for a superset of the + activities of the lower role. For instance, if the following roles are available: + <ul> + <li>roleA</li> + <li>roleA.roleB</li> + <li>roleA.roleB.roleC</li> + </ul> + If a user has the role [roleA] then, + <code>user.getSubject().getPrincipals()</code> + returns: + <ul> + <li>/role/roleA</li> + <li>/role/roleA/roleB</li> + <li>/role/roleA/roleB/roleC</li> + </ul> + </li> + </ul> + </p> + <p> + As described in the + <a href="atz-spi.html">authorization SPI section</a> + , the + <code>SecurityMappingHandler</code> + is configured with a specific hierarchy strategy for group and role hierarchy management. See the + <a href="../deployguide/security-config.html#security-spi-atz_xml">authorization SPI configuration</a> + for a configuration example. + </p> + </section> + <section name="Leveraging Preferences to Manage Hierarchies"> + <p> + The default hierarchy management implementation resolves the hierarchy strategy by leveraging Jetspeed 2's + <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/prefs/Preferences.html">java.util.prefs.Preferences</a> + implementation. The + <code>Preferences</code> + implementation provides the underlying structure in Jetspeed to store user attributes, and roles and groups definitions. The + <code>Preferences</code> + model provides a hierarchy model that is leveraged to store the base roles and groups hierarchy upon which various resolving strategies can be + applied (resolution by generalization or aggregation). + </p> + <p> + See Jetspeed 2 + <a href="dev-prefs.html">Preferences implementation section</a> + for more information. + </p> + <subsection name="How does this work?"> + <p> + The + <code>SecurityMappingHandler</code> + implementation resolves the mappings between roles and groups. Let's say that we want to find out the roles mapping to a specific group + name. To do so, the + <code>SecurityMappingHandler</code> + implements a + <code>getRolePrincipalsInGroup(String groupFullPathName)</code> + method. In this method, the group name is mapped to a specific + <code>Preferences</code> + node. According to a given hierarchy resolution strategy (see + <a href="#Hierarchy_Management_Overview">overview section</a> + ), being in [group A] may mean belonging to a set of groups; the HierarchyResolver is used to do so as illustrated below: + <source> + <![CDATA[ +public Set getRolePrincipalsInGroup(String groupFullPathName) +{ + ... + Preferences preferences = Preferences.userRoot().node( + GroupPrincipalImpl.getFullPathFromPrincipalName(groupFullPathName)); + String[] fullPaths = groupHierarchyResolver.resolve(preferences); + ... +}]]> + </source> + The resulting groups are then used to find all associated roles. + </p> + <p> + As a result of this implementation, the name of a role principal (<code>Principal</code> + <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/security/Principal.html#getName()">getName()</a>) + in the security layer should match the full path of that user preferences + root in the preferences layer (<code>Preference</code> + <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/prefs/Preferences.html#absolutePath()">absolutePath()</a>; e.g: + <code>/role/theRolePrincipal</code> + ). + </p> + <p> + Group and roles hierarchy are stored in the + <code>Preferences</code> + layer as follow (the output of <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/prefs/Preferences.html#exportNode(java.io.OutputStream)"> + exportNode()</a> for <a href="dev-prefs.html">Jetspeed's RBMS Preferences</a> implementation): + <source> + <![CDATA[ +<preferences EXTERNAL_XML_VERSION="1.0"> +<root type="user"> +<map /> + <node name="group1"> + <map /> + <node name="groupid1.1"> + <map /> + <node name="groupid1.1.1"> + <map /> + </node> + </node> + </node> + + <node name="role1"> + <map /> + <node name="roleid1.1"> + <map /> + <node name="roleid1.1.1"> + <map /> + </node> + </node> + </node> +</root>]]> + </source> + This structure would define the following group and role hierarchy: + <ul> + <li> + <code>/group1/groupid1.1/groupid1.1.1</code> + </li> + <li> + <code>/role1/roleid1.1/roleid1.1.1</code> + </li> + </ul> + Additionally, in this model, the + <code>map</code> + element can define groups or roles custom properties. For instance, a role could have a rule custom property (or a pointer to a rule) that + allow rule based role definition tied to some rule engine (Drools for instance) and is validated when the isInRole method is invoked. For + groups, a portal could use group to describe organization and have custom property such as address, city, etc. associated with the + organization/group. + </p> + </subsection> + </section> + </body> +</document> Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/high-level-services.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/high-level-services.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/high-level-services.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/high-level-services.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,98 @@ +<?xml version="1.0" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed 2 Security - High Level Security Services</title> + </properties> + <body> + <section name="High Level Security Services Overview"> + <p> + Jetspeed 2 provides the four following high level security services: + <ul> + <li> + <code>UserManager</code> + : Service providing user management capabilities. + </li> + <li> + <code>GroupManager</code> + : Service providing group management capabilities. + </li> + <li> + <code>RoleManager</code> + : Service providing role management capabilities. + </li> + <li> + <code>PermissionManager</code> + : Service providing permission management capabilities. + </li> + </ul> + </p> + </section> + <section name="Using High Level Security Services in Portlets"> + <p> + In order to access Jetspeed high level security services in your portlets, Jetspeed provide a custom + extension to the <code>portlet.xml</code> metadata. All Jetspeed custom metadata is located in the + <code>jetspeed-portlet.xml</code> configuration file in the <code>WEB-INF</code> folder of the portlet + application. The custom <code>js:services</code> tag provides the ability to expose portal services + to a portlet through the <code>javax.portlet.PortletContext</code>. + </p> + <p> + Jetspeed portal services are configured in the spring assembly file located in the portal + <code>WEB-INF/assembly/jetspeed-services</code> configuration file. The UserManager for instance + is configured as follow: + <source><![CDATA[ +<!-- Portlet Services --> +<bean id="PortalServices" + class="org.apache.jetspeed.services.JetspeedPortletServices" > + <constructor-arg> + <map> + ... + <entry key="UserManager"> + <ref bean="org.apache.jetspeed.security.UserManager"/> + </entry> + ... + </map> + </constructor-arg> +</bean>]]> + </source> + </p> + <p> + The <code>UserManager</code> services is then available to be loaded in a specific portlet + <code>PortletContext</code>. Portlet developers need to specify the portal services they + would like to use. The following example shows how to expose the portal <code>UserManager</code> + to a portlet application: + <source><![CDATA[ +<js:services> + <js:service name='UserManager'/> +</js:services>]]> + </source> + </p> + <p> + Once a portal service is loaded in the portlet context, the portlet implementation (which typically + extends <code>javax.portlet.GenericPortlet</code>) can access the service as follow: + <source><![CDATA[ +PortletContext context = getPortletContext(); +userManager = (UserManager) context.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT); +]]> + </source> + where <code>CommonPortletServices.CPS_USER_MANAGER_COMPONENT = "cps:UserManager"</code> + </p> + </section> + </body> +</document> + Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/index.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/index.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/index.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/index.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,89 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed for Developers</title> + <subtitle>Development</subtitle> + <authors> + <person name="David Sean Taylor" email="[email protected]" /> + <person name="David Le Strat" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Jetspeed For Developers"> + <p> +When developing with Jetspeed, you may be creating portlet applications, or building and creating extensions to the Jetspeed portal. +If you ar going to be creating portlet applications, check out this fine e-book for an overall guide to writing portlets: + </p> +<ul> +<li><a href='http://www.manning.com/hepper/' target='_blank'>Portlets and Apache Portals Book</a></li> +</ul> +<p>The core team of Jetspeed developers work directly with the source code, building the latest versions of Jetpeed. We welcome all software developers to work +with us. However, the full development process maybe overkill for your needs. If you simply want to create and build a customized Jetspeed portal, and make extensions to it, +check out the <i>Custom Build</i> section below. If you want to get more involved and start contributing to Jetspeed, see the section below on <i>Building from Source</i> +</p> +<p>Best place to get started developing Jetspeed is to read our <a href='../buildguide/index.html'>Build Guide</a></p> +<p>Starting with Jetspeed 2.2, all Jetspeed building is with Maven-2. The 2.1 branch used to support Maven-1, Maven-2, and Ant. We have consolidated all features from all 2.1.x builds into one new, Maven-2 build for version 2.2 and beyond</p> +<h2>Custom Building with Maven Plugins</h2> +<p>With the Jetspeed Custom build, you can actually build your own portal without the Jetspeed source. +You will want to customize your Jetspeed build, overriding the skins and themes, adding your own portlet applications and perhaps overriding +key components of the portal. To do so, we provide a custom build framework extending Maven-2. +</p> +<p>With the custom build, you can easily build and create your own Jetspeed powered portal without ever building Jetspeed itself.</p> +<p>Creating a custom build of Jetspeed is probably the most common usage of Jetspeed. Documentation for using the Custom Build and Plugins can be found here:</p> +<ul> +<li><a href='../buildguide/jetspeed-archetype.html'>Jetspeed Custom Build with Maven</a></li> +</ul> +<h2>Building from Source</h2> +<p>If you need to build the source, reference the Build Guide:</p> +<ul> +<li><a href='../buildguide/maven-2-build.html' target='_blank'>Building Jetspeed from Source with Maven-2</a></li> +</ul> +<p> +Jetspeed is built from the command line with Maven. However, you can still develop, compile, debug, remote debug, all from within Eclipse. +Eclipse is a good tool for developing portlet applications as well as Jetspeed extensions. +</p> +<ul> +<li><a href='jetspeed-eclipse.html' target='_blank'>Developing with Eclipse</a></li> +</ul> +<p> +To get the binary installation of an official Jetspeed release, go here: +</p> +<ul> +<li><a href='../download.html' target='_blank'>Getting the Binary Installer</a></li> +</ul> +<p> +You can checkout from the SVN HEAD from here: +</p> +<ul> +<li><a href='http://svn.apache.org/repos/asf/portals/jetspeed-2/portal/trunk/' target='_blank'>Checking out the Source Code from Subversion</a></li> +</ul> +<p> +Get your Javadocs here: +</p> +<ul> +<li><a href='http://www.bluesunrise.com/portlet-api/index.html' target='_blank'>Portlet API Docs</a></li> +<li><a href='../apidocs/index.html' target='_blank'>Jetspeed API Docs</a></li> +</ul> +<h2>Tutorials</h2> +<p>The tutorial puts everything together: custom builds, portlet development, deployment. You can find the Jetspeed Tutorial here:</p> +<a href='../tutorial/index.html'>Jetspeed Tutorial</a> + + </section> + </body> +</document> \ No newline at end of file Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/j2-maven-plugin.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/j2-maven-plugin.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/j2-maven-plugin.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/j2-maven-plugin.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,535 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed 2 Maven Plugin</title> + <subtitle>Documentation for Using Jetspeed 2 Maven Plugin</subtitle> + <authors> + <person name="David Le Strat" email="[email protected]" /> + <person name="Ate Douma" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Maven-2 Plugin Overview"> + <p> + Adding functionality to Maven is done through the Maven plugin mechanism. Maven comes shipped with numerous + plugins and provides an extensible framework for writing custom plugins. + Details on custom Maven plugins can be found in the + <a href="http://maven.apache.org/guides/plugin/guide-java-plugin-development.html">Writing a Plugin</a> section of Maven's web + site. + </p> + <p> + Jetspeed 2 has developed a custom Maven plugin that centralizes most common build goals required to build a + Jetspeed 2 based portal application. This provides many benefits: + </p> + <ul> + <li> + Better reusability of common build goals. Developers creating a new portal application can leverage the + Jetspeed 2 Maven plugin for common build operations. + </li> + <li> + The ability to quickly get started with a portal application. With the goal <code>j2:portal.genapp</code> + a new portal application can be created. The developer of the new application can reuse the Jetspeed 2 + Maven plugin goals for common build operations for quickStart, portlet deployment, etc. + </li> + <li> + Preparation for future migration to Maven 2 (M2). With M2, custom goals are encapsulated in plugins, maven.xml + is deprecated. By centralizing most of the Jetspeed 2 build goals to the Jetspeed 2 Maven plugin, migration to + M2 should be much easier. + </li> + </ul> + </section> + <section name="Portal Application creation and configuration Goals"> + <subsection name="Creating a new Portal Application"> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:portal.genapp</code></td> + <td> + Generates or updates a custom portal application. <!--Checkout the + <a href="getting-started.html#4__Creating_a_new_Portal_Application">Getting Started</a> + document for basic usage of this goal.--> + <br /> + </td> + </tr> + <tr> + <td><code>j2:portal.genapp.minimal</code></td> + <td> + Works similar to <code>j2:portal.genapp</code>. However, it + will only copy the following directories/files from <code>WEB-INF/pages</code>. + <ul> + <li>/WEB-INF/pages/Administrative/** (all contents)</li> + <li>/WEB-INF/pages/page.security</li> + </ul> + </td> + </tr> + </table> + </subsection> + <subsection name="Configuring and updating a Portal Application"> + <p> + The <code>j2:portal.genapp</code> goal above is actually no more than a wrapper around several (sub)goals + which can also be used individually to update and configure your portal application: + </p> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:portal.copy.webapp</code></td> + <td> + Copies the (static) Jetspeed 2 portal web resource from the plugin to the + <code>${org.apache.jetspeed.portal.webapp.dir}</code> folder. + <br /> + <br /> + Running this goal again will not clear out previous resources but <i>will</i> overwrite existing resources. + <br /> + <br /> + If you need to upgrade to a newer version of the Jetspeed 2 portal you should clear out these resources + yourself first. By default, the target folder is configured within the maven default target folder and + running the <code>clear</code> goal will do exactly that. + </td> + </tr> + <tr> + <td><code>j2:portal.copy.webapp.minimal</code></td> + <td> + Similar to <code>j2:portal.copy.webapp</code> However, it + will only copy the following directories/files from <code>WEB-INF/pages</code>. + <ul> + <li>/WEB-INF/pages/Administrative/** (all contents)</li> + <li>/WEB-INF/pages/page.security</li> + </ul> + </td> + </tr> + <tr> + <td><code>j2:portal.conf.project</code></td> + <td> + Creates a new maven or updates an existing portal project configuration in the + <code>${org.apache.jetspeed.portal.home.dir}</code> folder. + <br /> + It creates a hiearchy of 5 maven project files: + <ul> + <li><code>project-info.xml</code></li> + <li><code>core-build.xml extends project-info.xml</code></li> + <li><code>jetspeed-components.xml extends core-build.xml</code></li> + <li><code>full-portal.xml extends jetspeed-components.xml</code></li> + <li><code>project.xml extends full-portal.xml</code></li> + </ul> + Of the above files, the first and the last (project-info.xml and project.xml) may be modified to provide + additional project information and configuration and will not be updated by this goal again. Only the + other 3 files will be rewritten by this goal. If you need to upgrade to a newer version of the Jetspeed 2 + portal your own customization will be preserved. + <br /> + <br /> + Additionally, you can add your own maven.xml and/or project.properties or build.properties to further + customize your portal. These also will be preserverd when you run this goal again. + </td> + </tr> + <tr> + <td><code>j2:portal.conf.sql</code></td> + <td> + Generates the portal sql schema DDL for the configured database(s) under the + <code>${org.apache.jetspeed.portal.sql.dir}</code>, as well as copies over statically defined common and + selected database specific sql DML and DDL (possibly overriding generated DDL). + <br /> + <br /> + The content of the sql target folder is cleared out first when this goal is run. + </td> + </tr> + <tr> + <td><code>j2:portal.conf.ojb</code></td> + <td> + Copies the OJB configuration, filtered for the currently selected production database to the + <code>${org.apache.jetspeed.portal.target.dir}</code> folder. + <br /> + <br /> + As default, the above target folder is configured under the default maven war target folder. The maven + <code>clear</code> goal will also remove this filtered OJB configuration. + </td> + </tr> + <tr> + <td><code>j2:portal.conf.ldap</code></td> + <td> + Copies the LDAP configuration, to the + <code>${org.apache.jetspeed.portal.target.dir}</code> folder. + </td> + </tr> + <tr> + <td><code>j2:portal.conf.jetspeed</code></td> + <td> + Copies the filtered <code>jetspeed.properties</code> portal configuration to the + <code>${org.apache.jetspeed.portal.target.dir}</code> folder. + <br /> + <br /> + As default, the above target folder is configured under the default maven war target folder. The maven + <code>clear</code> goal will also remove this filtered <code>jetspeed.properties</code> file. + </td> + </tr> + <tr> + <td><code>j2:portal.conf.tomcat</code></td> + <td> + Copies a filtered Tomcat context descriptor, containing current database connection configuration to the + <code>${org.apache.jetspeed.portal.conf.dir}</code> folder. + <br /> + <br /> + Based on the <code>${org.apache.jetspeed.catalina.major.version}</code> setting, a Tomcat 6.x + type template context descriptor will be used. + <br /> + <br /> + The filtered Tomcat context descriptor will be copied to the Tomcat server by the + <code>j2:portal.deploy</code> goal. + <br /> + <br /> + If you need to change the Tomcat major version and/or database connection configuration, you need to + run this goal again before (re)deploying your portal. + <br /> + <br /> + As default, the above target folder is configured under the default maven target folder. The maven + <code>clear</code> goal will remove this filtered context descriptor file. + </td> + </tr> + </table> + </subsection> + </section> + <section name="Portal Application Deployment Goals"> + <subsection name="Quickstart deployment goals"> + <p> + Several goals are available for quickly deploying the Portal Application together with a predefined set of + Portlet Applications and optionally with creating and seeding the portal database. + </p> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:doStart</code></td> + <td> + A generic goal for deploying the portal application and setting up the required dependencies for the + configured Tomcat Server (shared libraries, portal application context, etc.). + <br /> + <br /> + This goal requires the plugin property <code>deployType</code> to be set. The default value is + <code>"j2:fullDeploy"</code> (see below). + <br /> + <br /> + If plugin property <code>recreateDB</code> is set, goal <code>j2:db.recreate</code> is invoked. + <br /> + All existing Jetspeed 2 standard and demo portlet applications are removed through goal + <code>j2:remove.wars</code>. + <br /> + The shared dependecies are copied to the Tomcat Server with goal <code>j2:copy.shared.deps</code>. + <br /> + And finally, the set <code>deployType</code> plugin property value is used to run a specific deploy goal. + </td> + </tr> + <tr> + <td><code>j2:quickStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:fullDeploy"</code> and + <code>recreateDB=true</code>. + </td> + </tr> + <tr> + <td><code>j2:nodbQuickStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:nodbfullDeploy"</code> and + <code>recreateDB=false</code>. + </td> + </tr> + <tr> + <td><code>j2:basicStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:basicDeploy"</code> and + <code>recreateDB=true</code>. + </td> + </tr> + <tr> + <td><code>j2:nodbBasicStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:nodbBasicDeploy"</code> and + <code>recreateDB=false</code>. + </td> + </tr> + <tr> + <td><code>j2:minStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:minDeploy"</code> and + <code>recreateDB=true</code>. + </td> + </tr> + <tr> + <td><code>j2:nodbMinStart</code></td> + <td> + Invokes <code>j2:doStart</code> with <code>deployType="j2:nodbMinDeploy"</code> and + <code>recreateDB=false</code>. + </td> + </tr> + </table> + </subsection> + <subsection name="Deployment supporting Goals"> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td>j2:remove.wars</td> + <td> + Removes the portal, all standard and demo portlet applications (see <code>j2:fullDeploy</code> below) + and their context descriptors (if any) from the Tomcat Server. + </td> + </tr> + <tr> + <td><code>j2:catalina.base.shared</code></td> + <td> + Copies all base jars necessary for the common portlet container. + </td> + </tr> + <tr> + <td><code>j2:catalina.shared</code></td> + <td>Copies all jars necessary for common container</td> + </tr> + <tr> + <td><code>j2:copy.shared.deps</code></td> + <td> + Wrapper goal invoking <code>j2:catalina.base.shared</code> and <code>j2:catalina.shared</code>. + </td> + </tr> + <tr> + <td><code>j2:portal.deploy</code></td> + <td> + Deploys the portal application only and its dependencies to the Tomcat Server, but no portlet applications. + <br /> + <br /> + First, it removes the current portal installation with goal <code>j2:remove.wars</code>. + <br/> + Then it copies and expands the build portal war from the local maven repository to the application server. + <br /> + And it copies a Tomcat context descriptor for the portal (see also goal <code>j2:portal.conf.tomcat</code>). + <br /> + Finally, it installs the shared dependencies with goal <code>j2:copy.shared.deps</code>. + </td> + </tr> + </table> + </subsection> + <subsection name="Standard and Demo Portlet Application deployment goals"> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:deploy</code></td> + <td> + Generic goal to deploy a portlet application identified by property <code>${maven.war.final.name}</code>. + <br /> + <br /> + The portlet application is searched for in the Jetspeed2 group of the local maven repository. When + searching portlets in the repository, this goal searches for the portlet application given the Jetspeed 2 + version number configured in the plugin. The name of the file searched in the repository following the + convention <code>${maven.war.final.name}-${jetspeed.version}.war</code> and is deployed as + <code>${maven.war.final.name}.war</code>. + </td> + </tr> + <tr> + <td><code>j2:pam.layoutdeploy</code></td> + <td>Deploys Jetspeed local layout portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.admindeploy</code></td> + <td>Deploys Jetspeed Administration portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.tsdeploy</code></td> + <td>Deploys Pluto Test Suite portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.strutsdeploy</code></td> + <td>Deploys the struts mailreader demo portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.jpetstoredeploy</code></td> + <td>Deploys the iBatis JPetstore based demo portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.jsfdeploy</code></td> + <td>Deploys the JSF demo portlet application which uses Jetspeed generic JSF portlet bridge.</td> + </tr> + <tr> + <td><code>j2:pam.jsfmyfacesdeploy</code></td> + <td>Deploys the JSF demo portlet application which uses MyFaces native JSF portlet bridge.</td> + </tr> + <tr> + <td><code>j2:pam.phpdeploy</code></td> + <td>Deploys the Jetspeed PHP bridge demo portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.perldeploy</code></td> + <td>Deploys the Jetspeed Perl bridge demo portlet application.</td> + </tr> + <tr> + <td><code>j2:pam.rssdeploy</code></td> + <td>Deploys the RSS feed demo portlet application.</td> + </tr> + <tr> + <td><code>j2:nodbMinDeploy</code></td> + <td> + Deploys the portal using the <code>j2:portal.deploy</code> goal and only the layout and admin portlets + using <code>j2:pam.layoutdeploy</code> and <code>j2:pam.admindeploy</code>. + </td> + </tr> + <tr> + <td><code>j2:minDeploy</code></td> + <td> + The same functionality as <code>j2:nodbMinDeploy</code> and additionaly seeds the portal database using + the <code>j2:db.entities</code> goal. + </td> + </tr> + <tr> + <td><code>j2:nodbfullDeploy</code></td> + <td> + The same functionality as <code>j2:nodbMinDeploy</code> but additional deploys all other demo portlet + applications (see full list above). + </td> + </tr> + <tr> + <td><code>j2:fullDeploy</code></td> + <td> + The same functionality as <code>j2:nodbFullDeploy</code> and additionaly seeds the portal database using + the <code>j2:db.entities</code> goal. + </td> + </tr> + </table> + </subsection> + </section> + <section name="Database Management Goals"> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:start.production.server</code></td> + <td>Starts a HSQLDB production database for usage by the portal. This goal is optional to those who use the default embedded Derby database.</td> + </tr> + <tr> + <td><code>j2:start.test.server</code></td> + <td> + Starts a HSQLDB test database to be used for the testcases during the build of Jetspeed 2. + This goal is optional for those who use the default embedded Derby database for testing Jetspeed 2. + </td> + </tr> + <tr> + <td><code>j2:db.create.test</code></td> + <td> + Creates the test database tables. If using the HSQLDB database, it should be started first with + goal <code>j2:start.test.server</code>. + <br /> + Existing portal tables are dropped first. The first time, this will lead to "table does not exist" + error messages but they can be (and are) ignored. + </td> + </tr> + <tr> + <td><code>j2:db.create.production</code></td> + <td> + Creates the production database tables. If using the HSQLDB database, it should be started first + with goal <code>j2:start.production.server</code>. + <br /> + Existing portal tables are dropped first. The first time, this will lead to "table does not exist" + kind of error messages but they can (and are) ignored. + </td> + </tr> + <tr> + <td><code>j2:db.recreate</code></td> + <td> + Recreates the production database using the <code>j2:db.create.production</code> goal but first + (re)generates the sql scripts using <code>j2:portal.conf.sql</code>. + </td> + </tr> + <tr> + <td><code>j2:db.drop.test</code></td> + <td>Drops the test database portal tables.</td> + </tr> + <tr> + <td><code>j2:db.drop.production</code></td> + <td>Drops the production database portal tables.</td> + </tr> + <tr> + <td><code>j2:db.entities</code></td> + <td> + Populates the users information for the default PSML configuration configured with Jetspeed 2. + </td> + </tr> + </table> + </section> + <section name="LDAP Management Goals"> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:start.ldap.server</code></td> + <td>Starts the default Apache Directory Server and load the default + <i><a href="http://svn.apache.org/viewcvs.cgi/portals/jetspeed-2/trunk/etc/apacheds/apacheds-server.xml?view=markup">apacheds-server.xml</a></i> configuration.</td> + </tr> + </table> + </section> + <section name="Auxillary Jetspeed Components Deployment Goals"> + <p> + Generic set of goals for redeploying a specific Jetspeed component. + </p> + <table> + <tr> + <th>Goal</th> + <th>Description</th> + </tr> + <tr> + <td><code>j2:jar.deploy</code></td> + <td> + Deploys a Jetspeed core component from the local maven repository to the deployment directory. + </td> + </tr> + <tr> + <td><code>j2:jar.deploy.shared</code></td> + <td> + Deploys a Jetspeed core component shared library from the local maven repository to the Tomcat shared + library directory. + </td> + </tr> + <tr> + <td><code>j2:deployDecorations</code></td> + <td> + Deploys all decoration files from the WEB-INF/decorations directory to the deployed portal. + </td> + </tr> + <tr> + <td><code>j2:deployTemplates</code></td> + <td> + Deploys all template files from the WEB-INF/templates directory to the deployed portal. + </td> + </tr> + </table> + </section> + </body> +</document> + Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/jetspeed-eclipse.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/jetspeed-eclipse.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/jetspeed-eclipse.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/jetspeed-eclipse.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,90 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title> + Developing Jetspeed with Eclipse + </title> + <subtitle>How-to for Building and Debugging Jetspeed with Eclipse</subtitle> + <authors> + <person name="David Sean Taylor" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Developing with Eclipse"> + <subsection name="The Eclipse Classpath"> + <p> + Compiling, debugging, external dependencies, source code completion, searching, auto imports, all rely on a properly configured classpath. + When you first create a project, a .classpath file is created in the projects root directory. + With the Jetspeed source, we provide you with a ready-to-use Eclipse .classpath file. + We have already configured the relative source directories for you. + Eclipse provides a .classpath GUI editor from the Project->Properties menu option. + </p> + </subsection> + <subsection name="JAR files and the Maven-1 repository"> + <p> + Jetspeed requires quite a few JAR files to be able to compile. + The .classpath file that comes with Jetspeed is setup to get its JAR files out of a local Maven-1 repository. + You can see all the JAR file dependencies from Eclipse. Go to Project->Properties->Java Build Path->Libraries. + Notice all the JAR files are configured as VARIABLE library entries. + Take one example: + <source> + MAVEN_REPO/commons-lang/jars/commons-lang-2.0.jar + </source> + The Variable is portion is MAVEN_REPO. + The Extension portion is /commons-lang/jars/commons-lang-2.0.jar + Eclipse locates the JAR dependency from a Variable location root. + In order for this classpath to work correctly, the variable root is dependent on a Maven-1 local repository file structure. + </p> + <p> + To configure the MAVEN_REPO variable, go to Window->Preferences->Java->Build Path->Classpath Variables, + click on New, and define a new variable named MAVEN_REPO, pointing it out the root of your local Maven-1 repository, + usually someplace like your $HOME/.maven/repository. + </p> + </subsection> + <subsection name="JAR files and the Maven-2 repository"> + <p>The same procedure applies for working a local Maven-2 repository. + We provide an alternative .classpath file found in the source code under <b>etc/editors/m2.classpath</b>. + Copy m2.classpath over the .classpath file in the project root. + </p> + <p>This classpath requires a different Eclipse classpath variable: M2_REPO. + To configure the M2_REPO variable, go to Window->Preferences->Java->Build Path->Classpath Variables, + click on New, and define a new variable named MAVEN_REPO, pointing it out the root of your local Maven-2 repository, + usually someplace like your $HOME/.m2/repository. + </p> + </subsection> + </section> + <section name="Debugging with Eclipse and Tomcat"> + <p>Remote debugging of the Jetspeed Portal running on Tomcat requires that you start Tomcat up with debugging enabled. + Here is a shell script that can be used to debug: + </p> +<source><![CDATA[ +export JPDA_TRANSPORT=dt_socket +export JPDA_ADDRESS=8000 +./catalina.sh jpda start +]]></source> +<source><![CDATA[ +<p>A DOS script:</p> +set JPDA_TRANSPORT=dt_socket +set JPDA_ADDRESS=8000 +catalina jpda start +]]></source> +<p>From there, just follow the Eclipse documentation on how to remotely debug.</p> + </section> + </body> +</document> Added: portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/login-module.xml URL: http://svn.apache.org/viewvc/portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/login-module.xml?rev=1691449&view=auto ============================================================================== --- portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/login-module.xml (added) +++ portals/site/jetspeed/jetspeed-2.3/jetspeed-guide-dev/src/site/xdoc/login-module.xml Thu Jul 16 21:01:09 2015 @@ -0,0 +1,155 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<document> + <properties> + <title>Jetspeed 2 Security - Login Module</title> + <authors> + <person name="David Le Strat" email="[email protected]" /> + </authors> + </properties> + <body> + <section name="Login Module Overview"> + <p> + For authentication purpose, Jetspeed 2 provide a default login module implementation. Login modules provide a standard way to expose + authentication services for java application. More information about login modules can be found in the JDK + <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/security/auth/spi/LoginModule.html">LoginModule interface</a> + documentation. + </p> + </section> + <section name="Login Module Configuration"> + <p> + Configuration is central to JAAS authentication. By default, Jetspeed 2 is configured to use its + <code>DefaultLoginModule</code> + implementation. The configuration file (login.conf) for the login module ship with the + <code>jetspeed2-security-{version}.jar</code> + component and provide the following configuration: + <source> + <![CDATA[ +Jetspeed { + org.apache.jetspeed.security.impl.DefaultLoginModule required; +};]]> + </source> + </p> + <p> + In order to override this configuration, you can place your own login.conf file in your web application class path under WEB-INF/classes. The + location of the login.conf file is configured in the + <code>security-providers.xml</code> + as described below. For more information on how to configure the security providers, see + <a href="../deployguide/security-config.html">the configuration section</a>. + </p> + <p> + <source> + <![CDATA[ +<!-- Security: Default Authentication Provider --> +<bean id="org.apache.jetspeed.security.AuthenticationProvider" + class="org.apache.jetspeed.security.impl.AuthenticationProviderImpl" +> + <constructor-arg index="0"><value>DefaultAuthenticator</value></constructor-arg> + <constructor-arg index="1"><value>The default authenticator</value></constructor-arg> + <constructor-arg index="2"><value>login.conf</value></constructor-arg> + <constructor-arg index="3"> + <ref bean="org.apache.jetspeed.security.spi.CredentialHandler"/> + </constructor-arg> + <constructor-arg index="4"> + <ref bean="org.apache.jetspeed.security.spi.UserSecurityHandler"/> + </constructor-arg> +</bean>]]> + </source> + </p> + <p> + The <code>AuthenticationProvider</code> configures the <code>LoginModule</code> to be used by the + application by setting the System property <code>java.security.auth.login.config</code> to the + <code>login.conf</code> specified in the component configuration. + </p> + </section> + <section name="Login Module Implementation"> + <p> + The + <code>DefaultLoginModule</code> + implementation is illustrated by the class diagram below: + <br /> + </p> + <table> + <tr> + <td style="background-color:#FFFFFF;" align="center"> + <img src="images/default-login-module-c.gif" border="0" /> + </td> + </tr> + </table> + <p> + The roles of the classes used to implement the DefaultLoginModule are: + </p> + <table> + <tr> + <th>Class</th> + <th>Description</th> + </tr> + <tr> + <td><code>org.apache.jetspeed.security.impl.DefaultLoginModule</code></td> + <td> + The + <code>javax.security.auth.spi.LoginModule</code> + implementation. The + <code>DefaultLoginModule</code> + authentication decision is encapsulated behind the + <code>UserManager</code> + interface which leverages the SPI implementation to decide which authenticator should be used in order to authenticate a user against a + specific system of record. For more information on how to implement your own authenticator, see the + <a href="atn-spi.html">authentication SPI documentation</a>. + </td> + </tr> + <tr> + <td><code>org.apache.jetspeed.security.LoginModuleProxy</code></td> + <td> + A utility component used to expose the + <code>UserManager</code> + to the + <code>DefaultLoginModule</code>. + </td> + </tr> + <tr> + <td><code>org.apache.jetspeed.security.User</code></td> + <td> + The + <code>User</code> + is an interface that holds the + <code>javax.security.auth.Subject</code> + and his/her + <code>java.util.prefs.Preferences</code>. The + <code>UserManager</code> + upon user authentication populates the user subject with all user + <code>java.security.Principal</code>. Jetspeed 2 implements 3 types of principals: + <ul> + <li>UserPrincipal: The principal holding the user unique identifier for the application.</li> + <li>RolePrincipal: The principal representing a role for the system.</li> + <li>GroupPrincipal: The principal representing a group for the system.</li> + </ul> + </td> + </tr> + <tr> + <td><code>org.apache.jetspeed.security.UserManager</code></td> + <td> + The interface exposing all user operations. This interfaces fronts the aggregates various SPI to provide developers with the ability to + map users to their specific system of record. + </td> + </tr> + </table> + </section> + + </body> +</document> \ No newline at end of file
