You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by rw...@apache.org on 2014/03/16 06:00:08 UTC
svn commit: r1577983 [2/2] - in /portals/jetspeed-2/portal/trunk:
components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/om/folder/proxy/
components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/page/document/proxy/
components/jetsp...
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteView.java Sun Mar 16 05:00:07 2014
@@ -56,7 +56,7 @@ public class SearchPathsSiteView extends
* searchPaths - validated list of ordered search path objects
* where paths have no trailing folder separator
*/
- private List searchPaths;
+ private List<SiteViewSearchPath> searchPaths;
/**
* searchPathsString - search paths as string
@@ -86,14 +86,14 @@ public class SearchPathsSiteView extends
* object form
* @param forceReservedVisible force visibility of hidden/reserved folders
*/
- public SearchPathsSiteView(PageManager pageManager, List searchPaths, boolean forceReservedVisible)
+ public SearchPathsSiteView(PageManager pageManager, List<?> searchPaths, boolean forceReservedVisible)
{
super(pageManager);
if ((searchPaths != null) && !searchPaths.isEmpty())
{
// validate search path format and existence
- this.searchPaths = new ArrayList(searchPaths.size());
- List allSearchPaths = new ArrayList(searchPaths.size());
+ this.searchPaths = new ArrayList<SiteViewSearchPath>(searchPaths.size());
+ List<SiteViewSearchPath> allSearchPaths = new ArrayList<SiteViewSearchPath>(searchPaths.size());
StringBuilder searchPathsStringBuilder = new StringBuilder();
Iterator pathsIter = searchPaths.iterator();
while (pathsIter.hasNext())
@@ -174,7 +174,7 @@ public class SearchPathsSiteView extends
{
// single non-principal search path is the base
// search path
- SiteViewSearchPath searchPath = (SiteViewSearchPath)allSearchPaths.get(0);
+ SiteViewSearchPath searchPath = allSearchPaths.get(0);
if (!searchPath.isPrincipalPath())
{
this.baseSearchPath = searchPath;
@@ -242,10 +242,10 @@ public class SearchPathsSiteView extends
else
{
// root search path with no aggregation
- this.searchPaths = new ArrayList(1);
+ this.searchPaths = new ArrayList<SiteViewSearchPath>(1);
this.searchPaths.add(new SiteViewSearchPath(ProfileLocator.PAGE_LOCATOR));
this.searchPathsString = Folder.PATH_SEPARATOR;
- this.baseSearchPath = (SiteViewSearchPath)this.searchPaths.get(0);
+ this.baseSearchPath = this.searchPaths.get(0);
}
this.forceReservedVisible = forceReservedVisible;
}
@@ -268,11 +268,11 @@ public class SearchPathsSiteView extends
* @param searchPaths array of search paths
* @return search path list
*/
- private static List makeSearchPathList(String [] searchPaths)
+ private static List<String> makeSearchPathList(String [] searchPaths)
{
if ((searchPaths != null) && (searchPaths.length > 0))
{
- List searchPathsList = new ArrayList(searchPaths.length);
+ List<String> searchPathsList = new ArrayList<String>(searchPaths.length);
for (int i = 0; (i < searchPaths.length); i++)
{
searchPathsList.add(searchPaths[i]);
@@ -323,12 +323,12 @@ public class SearchPathsSiteView extends
* @param locator profile locator search specification
* @return search path list
*/
- private static List makeSearchPathList(ProfileLocator locator)
+ private static List<SiteViewSearchPath> makeSearchPathList(ProfileLocator locator)
{
if (locator != null)
{
// generate and return locator search paths
- return mergeSearchPathList(ProfileLocator.PAGE_LOCATOR, locator, new ArrayList(8));
+ return mergeSearchPathList(ProfileLocator.PAGE_LOCATOR, locator, new ArrayList<SiteViewSearchPath>(8));
}
return null;
}
@@ -340,7 +340,7 @@ public class SearchPathsSiteView extends
* @param locators map of named profile locator search specifications
* @param forceReservedVisible force visibility of hidden/reserved folders
*/
- public SearchPathsSiteView(PageManager pageManager, Map locators, boolean forceReservedVisible)
+ public SearchPathsSiteView(PageManager pageManager, Map<String,ProfileLocator> locators, boolean forceReservedVisible)
{
this(pageManager, makeSearchPathList(locators), forceReservedVisible);
}
@@ -351,7 +351,7 @@ public class SearchPathsSiteView extends
* @param locators map of named profile locator search specifications
* @return search path list
*/
- private static List makeSearchPathList(Map locators)
+ private static List<SiteViewSearchPath> makeSearchPathList(Map<String,ProfileLocator> locators)
{
if ((locators != null) && !locators.isEmpty())
{
@@ -359,7 +359,7 @@ public class SearchPathsSiteView extends
// profile locator search paths with the 'page' locator
// having priority, (all other named locators are processed
// subsequent to 'page' in unspecified order).
- List searchPaths = new ArrayList(8 * locators.size());
+ List<SiteViewSearchPath> searchPaths = new ArrayList<SiteViewSearchPath>(8 * locators.size());
ProfileLocator pageLocator = (ProfileLocator)locators.get(ProfileLocator.PAGE_LOCATOR);
if (pageLocator != null)
{
@@ -375,7 +375,7 @@ public class SearchPathsSiteView extends
if (!locatorName.equals(ProfileLocator.PAGE_LOCATOR))
{
// add alternate locator search paths
- mergeSearchPathList(locatorName, (ProfileLocator)locators.get(locatorName), searchPaths);
+ mergeSearchPathList(locatorName, locators.get(locatorName), searchPaths);
}
}
}
@@ -470,7 +470,7 @@ public class SearchPathsSiteView extends
* @param searchPaths list of search paths to merge into
* @return search path list
*/
- private static List mergeSearchPathList(String locatorName, ProfileLocator locator, List searchPaths)
+ private static List<SiteViewSearchPath> mergeSearchPathList(String locatorName, ProfileLocator locator, List<SiteViewSearchPath> searchPaths)
{
// generate profile locator search paths with locator
// names to be used later for node identification and
@@ -482,14 +482,14 @@ public class SearchPathsSiteView extends
// (multiple property values are returned sequentially),
// profiler locator iterations may be skipped to
// generate the proper search paths
- List locatorSearchPaths = new ArrayList(8);
+ List<PathStringBuilder> locatorSearchPaths = new ArrayList<PathStringBuilder>(8);
int addLocatorSearchPathsAt = 0;
Iterator<ProfileLocatorProperty []> locatorIter = locator.iterator();
while (locatorIter.hasNext())
{
// initialize path construction variables
String pathRoot = Folder.PATH_SEPARATOR;
- List paths = new ArrayList(8);
+ List<PathStringBuilder> paths = new ArrayList<PathStringBuilder>(8);
paths.add(new PathStringBuilder(pathRoot));
int pathDepth = 0;
int lastPathsCount = 0;
@@ -588,7 +588,7 @@ public class SearchPathsSiteView extends
// duplicate last locator paths set, stripping last matching
// control value from each, appending new value, and adding new
// valued set to collection of paths
- ArrayList multipleValuePaths = new ArrayList(lastPathsCount);
+ ArrayList<PathStringBuilder> multipleValuePaths = new ArrayList<PathStringBuilder>(lastPathsCount);
Iterator pathsIter = paths.iterator();
for (int count = 0; (pathsIter.hasNext() && (count < lastPathsCount)); count++)
{
@@ -737,7 +737,7 @@ public class SearchPathsSiteView extends
*
* @return search paths list
*/
- public List getSearchPaths()
+ public List<SiteViewSearchPath> getSearchPaths()
{
return searchPaths;
}
@@ -810,7 +810,7 @@ public class SearchPathsSiteView extends
* @param node node view
* @return definition locator list
*/
- public List getMenuDefinitionLocators(Node node)
+ public List<SiteViewMenuDefinitionLocator> getMenuDefinitionLocators(Node node)
{
// access node proxy from specified node and
// return associated definition locators
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteViewProxy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteViewProxy.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteViewProxy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SearchPathsSiteViewProxy.java Sun Mar 16 05:00:07 2014
@@ -83,7 +83,7 @@ public abstract class SearchPathsSiteVie
* @param methodName method name
* @param methodArgs array of type, class, or interface parameter types
*/
- protected static Method reflectMethod(Class methodClass, String methodName, Class [] methodArgs)
+ protected static Method reflectMethod(Class<?> methodClass, String methodName, Class<?> [] methodArgs)
{
// trap reflection exceptions
try
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/main/java/org/apache/jetspeed/portalsite/view/SiteViewUtils.java Sun Mar 16 05:00:07 2014
@@ -16,14 +16,14 @@
*/
package org.apache.jetspeed.portalsite.view;
+import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.page.document.Node;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.jetspeed.om.folder.MenuDefinition;
-import org.apache.jetspeed.page.document.Node;
-
/**
* Utilities for constructing and accessing site views.
*
@@ -37,14 +37,14 @@ public class SiteViewUtils
* to be used by derived implementations to aggregate
* menu definition locators
*
- * @param locators list of menu definition locators to merge
- * @param node menu definition node
+ * @param definitions list of menu definitions to merge
+ * @param definitionNode menu definition node
* @param path node view path
* @param override override menu definition
* @param menuDefinitionLocators merged menu definition locators
* @return merged menu definition locators
*/
- public static List mergeMenuDefinitionLocators(List definitions, Node definitionNode, String path, boolean override, List menuDefinitionLocators)
+ public static List<SiteViewMenuDefinitionLocator> mergeMenuDefinitionLocators(List<MenuDefinition> definitions, Node definitionNode, String path, boolean override, List<SiteViewMenuDefinitionLocator> menuDefinitionLocators)
{
// merge definitions into aggregated menu definition
// locators if defined
@@ -64,7 +64,7 @@ public class SiteViewUtils
{
if (menuDefinitionLocators == null)
{
- menuDefinitionLocators = Collections.synchronizedList(new ArrayList(definitions.size() * 2));
+ menuDefinitionLocators = Collections.synchronizedList(new ArrayList<SiteViewMenuDefinitionLocator>(definitions.size() * 2));
}
menuDefinitionLocators.add(new SiteViewMenuDefinitionLocator(definition, definitionNode, path, override));
}
@@ -87,7 +87,7 @@ public class SiteViewUtils
* @param menuDefinitionLocators merged menu definition locators
* @return merged menu definition locators
*/
- public static List mergeMenuDefinitionLocators(List locators, List menuDefinitionLocators)
+ public static List<SiteViewMenuDefinitionLocator> mergeMenuDefinitionLocators(List<SiteViewMenuDefinitionLocator> locators, List<SiteViewMenuDefinitionLocator> menuDefinitionLocators)
{
// merge locators into aggregated menu definition
// locators if defined
@@ -106,7 +106,7 @@ public class SiteViewUtils
{
if (menuDefinitionLocators == null)
{
- menuDefinitionLocators = Collections.synchronizedList(new ArrayList(locators.size() * 2));
+ menuDefinitionLocators = Collections.synchronizedList(new ArrayList<SiteViewMenuDefinitionLocator>(locators.size() * 2));
}
menuDefinitionLocators.add(locator);
}
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal-site/src/test/java/org/apache/jetspeed/portalsite/TestPortalSite.java Sun Mar 16 05:00:07 2014
@@ -431,7 +431,7 @@ public class TestPortalSite extends Abst
locator.add("navigation", false, true, "subsite-root");
profileView = new SearchPathsSiteView(pageManager, locator, false);
assertEquals("/__subsite-root", profileView.getSearchPathsString());
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locator = new JetspeedProfileLocator();
locator.init(null, "/");
locator.add("role", true, false, "role0");
@@ -628,7 +628,7 @@ public class TestPortalSite extends Abst
locator.add("role", true, false, "role1");
locator.add("navigation", false, true, "/");
locator.add("group", true, false, "group");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -784,7 +784,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("page", false, false, "default-page");
locator.add("user", true, false, "user");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -800,7 +800,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("page", false, false, null);
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -816,7 +816,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("page", false, false, "page1");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -832,7 +832,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("page", false, false, "folder1/");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -848,7 +848,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("page", false, false, "/folder0/");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -863,7 +863,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/");
locator.add("page", false, false, "/folder3/default-folder0/");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, null);
assertNotNull(requestContext);
@@ -880,7 +880,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/_user/user/page2.psml");
locator.add("user", true, false, "admin");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "admin", true, true, true, false);
assertNotNull(requestContext);
@@ -934,7 +934,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/");
@@ -1265,7 +1265,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/folder0");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/folder0");
@@ -1329,7 +1329,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/page1.psml");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/page1.psml");
@@ -1475,7 +1475,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/page0.psml");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/page0.psml");
@@ -1502,7 +1502,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/folder1");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/folder1");
@@ -1768,7 +1768,7 @@ public class TestPortalSite extends Abst
locator.init(null, "/folder1/folder/page0.psml");
locator.add("user", true, false, "user");
locator.add("mediatype", true, false, "html");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
locator = new JetspeedProfileLocator();
locator.init(null, "/folder1");
@@ -2046,7 +2046,7 @@ public class TestPortalSite extends Abst
JetspeedProfileLocator locator = new JetspeedProfileLocator();
locator.init(null, "/");
locator.add("user", true, false, "user");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2087,7 +2087,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/hidden.psml");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2128,7 +2128,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2226,7 +2226,7 @@ public class TestPortalSite extends Abst
JetspeedProfileLocator locator = new JetspeedProfileLocator();
locator.init(null, "/document.doc");
locator.add("user", true, false, "user");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2243,7 +2243,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/contentfolder/document.doc");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2260,7 +2260,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/contentfolder/folder/document.doc");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2277,7 +2277,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/contentfolder/document.txt");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2294,7 +2294,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/preview/document.doc");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2311,7 +2311,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/preview/contentfolder/draft/document.doc", "test.domain.com");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2328,7 +2328,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/document.psml");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2345,7 +2345,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/preview/folder0/page0.doc");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2362,7 +2362,7 @@ public class TestPortalSite extends Abst
locator = new JetspeedProfileLocator();
locator.init(null, "/page2.doc");
locator.add("user", true, false, "user");
- locators = new HashMap();
+ locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
requestContext = sessionContext.newRequestContext(locators, "user");
assertNotNull(requestContext);
@@ -2431,7 +2431,7 @@ public class TestPortalSite extends Abst
JetspeedProfileLocator locator = new JetspeedProfileLocator();
locator.init(null, "/contentpage.dpsml");
locator.add("admin", true, false, "admin");
- Map locators = new HashMap();
+ Map<String,ProfileLocator> locators = new HashMap<String,ProfileLocator>();
locators.put(ProfileLocator.PAGE_LOCATOR, locator);
PortalSiteRequestContext requestContext = sessionContext.newRequestContext(locators, "admin", true, true, true, true);
assertNotNull(requestContext);
@@ -2463,7 +2463,7 @@ public class TestPortalSite extends Abst
/**
* extractLocatorNameFromView - utility to access profile locator name from view
*
- * @param proxy site view node view
+ * @param view site view node view
* @return locator name
*/
private String extractLocatorNameFromView(Object view) throws Exception
Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteRequestContext.java Sun Mar 16 05:00:07 2014
@@ -16,14 +16,16 @@
*/
package org.apache.jetspeed.portalsite;
-import java.util.Map;
-import java.util.Set;
-
import org.apache.jetspeed.om.folder.Folder;
import org.apache.jetspeed.om.page.BaseFragmentsElement;
+import org.apache.jetspeed.om.page.FragmentDefinition;
import org.apache.jetspeed.om.page.PageTemplate;
import org.apache.jetspeed.page.document.NodeNotFoundException;
import org.apache.jetspeed.page.document.NodeSet;
+import org.apache.jetspeed.profiler.ProfileLocator;
+
+import java.util.Map;
+import java.util.Set;
/**
* This describes the request context for the portal-site component.
@@ -45,7 +47,7 @@ public interface PortalSiteRequestContex
*
* @return request profile locators
*/
- Map getLocators();
+ Map<String,ProfileLocator> getLocators();
/**
* getManagedPageOrTemplate - get request profiled concrete page or template
@@ -77,7 +79,7 @@ public interface PortalSiteRequestContex
* @throws NodeNotFoundException if page or fragment definition not found
* @throws SecurityException if page view access not granted
*/
- Map getManagedFragmentDefinitions() throws NodeNotFoundException;
+ Map<String,FragmentDefinition> getManagedFragmentDefinitions() throws NodeNotFoundException;
/**
* isContentPage - returns flag indicating request page is honoring
@@ -134,7 +136,7 @@ public interface PortalSiteRequestContex
* @throws NodeNotFoundException if page not found
* @throws SecurityException if page view access not granted
*/
- Map getFragmentDefinitions() throws NodeNotFoundException;
+ Map<String,FragmentDefinition> getFragmentDefinitions() throws NodeNotFoundException;
/**
* getFolder - get folder view relative to request profiled page
@@ -201,7 +203,7 @@ public interface PortalSiteRequestContex
*
* @return menu names set
*/
- Set getStandardMenuNames();
+ Set<String> getStandardMenuNames();
/**
* getCustomMenuNames - get set of custom menu names available as
@@ -211,7 +213,7 @@ public interface PortalSiteRequestContex
* @throws NodeNotFoundException if page not found
* @throws SecurityException if page view access not granted
*/
- Set getCustomMenuNames() throws NodeNotFoundException;
+ Set<String> getCustomMenuNames() throws NodeNotFoundException;
/**
* getMenu - get instantiated menu available for the request
Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java?rev=1577983&r1=1577982&r2=1577983&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/portalsite/PortalSiteSessionContext.java Sun Mar 16 05:00:07 2014
@@ -16,11 +16,12 @@
*/
package org.apache.jetspeed.portalsite;
+import org.apache.jetspeed.page.PageManager;
+import org.apache.jetspeed.profiler.ProfileLocator;
+
import java.io.Serializable;
import java.util.Map;
-import org.apache.jetspeed.page.PageManager;
-
/**
* This describes the session context for the portal-site component.
*
@@ -36,7 +37,7 @@ public interface PortalSiteSessionContex
* @param requestUserPrincipal request user principal
* @return new request context instance
*/
- PortalSiteRequestContext newRequestContext(Map requestProfileLocators, String requestUserPrincipal);
+ PortalSiteRequestContext newRequestContext(Map<String,ProfileLocator> requestProfileLocators, String requestUserPrincipal);
/**
* newRequestContext - create a new request context instance with history
@@ -47,7 +48,7 @@ public interface PortalSiteSessionContex
* if locators do not select a page or access is forbidden
* @return new request context instance
*/
- PortalSiteRequestContext newRequestContext(Map requestProfileLocators, String requestUserPrincipal, boolean requestFallback);
+ PortalSiteRequestContext newRequestContext(Map<String,ProfileLocator> requestProfileLocators, String requestUserPrincipal, boolean requestFallback);
/**
* newRequestContext - create a new request context instance
@@ -60,7 +61,7 @@ public interface PortalSiteSessionContex
* history to select default page per site folder
* @return new request context instance
*/
- PortalSiteRequestContext newRequestContext(Map requestProfileLocators, String requestUserPrincipal, boolean requestFallback, boolean useHistory);
+ PortalSiteRequestContext newRequestContext(Map<String,ProfileLocator> requestProfileLocators, String requestUserPrincipal, boolean requestFallback, boolean useHistory);
/**
* newRequestContext - create a new request context instance
@@ -75,7 +76,7 @@ public interface PortalSiteSessionContex
* @param forceTemplatesAccessible force templates accessible to requests in site view
* @return new request context instance
*/
- PortalSiteRequestContext newRequestContext(Map requestProfileLocators, String requestUserPrincipal, boolean requestFallback, boolean useHistory, boolean forceReservedVisible, boolean forceTemplatesAccessible);
+ PortalSiteRequestContext newRequestContext(Map<String,ProfileLocator> requestProfileLocators, String requestUserPrincipal, boolean requestFallback, boolean useHistory, boolean forceReservedVisible, boolean forceTemplatesAccessible);
/**
* newRequestContext - create a new request context instance without profiling
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org