© 2005 BEA Systems, Inc.

com.bea.jsptools.portal
Class PortalAdminEntitlementHelper

java.lang.Object
  extended bycom.bea.jsptools.portal.PortalAdminEntitlementHelper

public class PortalAdminEntitlementHelper
extends Object

This class contains helper methods used by the portal admin jsp tools to access and deal with portal entitlements.


Constructor Summary
PortalAdminEntitlementHelper()
           
 
Method Summary
static boolean doesPlaceholderDefinitionPolicyExist(String webApp, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
           
static boolean doesPlaceholderInstancePolicyExist(DesktopDefinitionId desktopDefId, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
          Method that checks to see if a PlaceholderDefinition is locked, meaning it has an admin level entitlement set on it.
static void findAndRemoveBookInstancePolicies(String webAppName, String bookDefinitionId, DesktopView[] desktopViews, HttpServletRequest request)
           
static void findAndRemovePageInstancePolicies(String webAppName, String pageDefinitionId, DesktopView[] desktopViews, HttpServletRequest request)
           
static void findAndRemovePortletInstancePolicies(String webAppName, String portletId, DesktopView[] desktopViews, boolean findAllInstances, HttpServletRequest request)
           
static List getDefinitionPolicies(String webApp, String resourceType, String definitionLabel, List capabilityNames)
           
static List getDefinitionPolicies(String webApp, String resourceType, String definitionLabel, List capabilityNames, ArrayList populatedList)
           
static List getInstancePolicies(String webApp, String resourceType, String instanceLabel, String definitionLabel, List capabilityNames, String desktopId)
          Method that gets all Entitlements set for a given Resource.
static void removeBookDefinitionPolicies(String webApp, String definitionId, String definitionLabel, DesktopView[] desktopViews, HttpServletRequest request)
          Method that removes all Entitlements set for a given Role.
static void removeBookInstancePolicies(String webApp, BookView bv, String portalPath, String desktopPath, HttpServletRequest request)
           
static void removeDesktopInstancePolicies(String webApp, DesktopView dv, String portalPath, String desktopPath, HttpServletRequest request)
           
static void removeLookAndFeelDefinitionPolicies(String webApp, String definitionId, String definitionLabel, HttpServletRequest request)
           
static void removePageDefinitionPolicies(String webApp, String definitionId, String definitionLabel, DesktopView[] desktopViews, HttpServletRequest request)
           
static void removePageInstancePolicies(String webApp, PageView pv, String portalPath, String desktopPath, HttpServletRequest request)
           
static void removePlaceholderDefinitionPolicy(String webApp, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
           
static void removePlaceholderInstancePolicy(DesktopDefinitionId desktopDefId, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
          Method that unlocks a PlaceholderDefinition by removing any admin level entitlement on it.
static void removePortletDefinitionPolicies(String webApp, String definitionId, String definitionLabel, DesktopView[] desktopViews, HttpServletRequest request)
           
static void removePortletInstancePolicies(String webApp, PortletView pv, String portalPath, String desktopPath, HttpServletRequest request)
           
static void setPlaceholderDefinitionPolicy(String webApp, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
           
static void setPlaceholderInstancePolicy(DesktopDefinitionId desktopDefId, PageDefinitionId pageDefId, PlaceholderDefinitionId placeholderDefId, HttpServletRequest request)
          Method that locks a PlaceholderDefinition by setting an admin level entitlement on it.
static void updatePolicies(String webApp, String resourceType, String definitionLabel, List allRoles, String desktopId, String descriptionText, ServletRequest request)
          Method that adds/removes Entitlements for a given List of Roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalAdminEntitlementHelper

public PortalAdminEntitlementHelper()
Method Detail

doesPlaceholderDefinitionPolicyExist

public static boolean doesPlaceholderDefinitionPolicyExist(String webApp,
                                                           PageDefinitionId pageDefId,
                                                           PlaceholderDefinitionId placeholderDefId,
                                                           HttpServletRequest request)

doesPlaceholderInstancePolicyExist

public static boolean doesPlaceholderInstancePolicyExist(DesktopDefinitionId desktopDefId,
                                                         PageDefinitionId pageDefId,
                                                         PlaceholderDefinitionId placeholderDefId,
                                                         HttpServletRequest request)

Method that checks to see if a PlaceholderDefinition is locked, meaning it has an admin level entitlement set on it.

Parameters:
request - The current HttpServletRequest
Returns:
true if the PlaceholderDefinition is currently locked

findAndRemoveBookInstancePolicies

public static void findAndRemoveBookInstancePolicies(String webAppName,
                                                     String bookDefinitionId,
                                                     DesktopView[] desktopViews,
                                                     HttpServletRequest request)

findAndRemovePageInstancePolicies

public static void findAndRemovePageInstancePolicies(String webAppName,
                                                     String pageDefinitionId,
                                                     DesktopView[] desktopViews,
                                                     HttpServletRequest request)

findAndRemovePortletInstancePolicies

public static void findAndRemovePortletInstancePolicies(String webAppName,
                                                        String portletId,
                                                        DesktopView[] desktopViews,
                                                        boolean findAllInstances,
                                                        HttpServletRequest request)

getDefinitionPolicies

public static List getDefinitionPolicies(String webApp,
                                         String resourceType,
                                         String definitionLabel,
                                         List capabilityNames)

getDefinitionPolicies

public static List getDefinitionPolicies(String webApp,
                                         String resourceType,
                                         String definitionLabel,
                                         List capabilityNames,
                                         ArrayList populatedList)

getInstancePolicies

public static List getInstancePolicies(String webApp,
                                       String resourceType,
                                       String instanceLabel,
                                       String definitionLabel,
                                       List capabilityNames,
                                       String desktopId)

Method that gets all Entitlements set for a given Resource.

The value of the resourceType argument must be one of PortalEntitlementResource.PAGE_RESOURCE_TYPE, PortalEntitlementResource.BOOK_RESOURCE_TYPE, PortalEntitlementResource.DESKTOP_RESOURCE_TYPE, PortalEntitlementResource.LOOK_AND_FEEL_RESOURCE_TYPE, PortalEntitlementResource.PORTLET_RESOURCE_TYPE, or null if dealing with the top level library entitlement.

The value of the definitionLabel argument must be the result of the getDefinitionLabel() call from the actual resource Definition.

Parameters:
webApp - The web application the Entitlements to be returned are scoped to
resourceType - The type of the resource to get the list of Entitlements for.
definitionLabel - The definition label of the resource to get the List of Entitlements for.
capabilityNames - The List of capabilities of the resource to get the List of Entitlements for.
desktopId - The desktopId of the resource to remove.

removeBookDefinitionPolicies

public static void removeBookDefinitionPolicies(String webApp,
                                                String definitionId,
                                                String definitionLabel,
                                                DesktopView[] desktopViews,
                                                HttpServletRequest request)

Method that removes all Entitlements set for a given Role.

The value of the resourceType argument must be one of PortalEntitlementResource.PAGE_RESOURCE_TYPE, PortalEntitlementResource.BOOK_RESOURCE_TYPE, PortalEntitlementResource.DESKTOP_RESOURCE_TYPE, PortalEntitlementResource.LOOK_AND_FEEL_RESOURCE_TYPE, PortalEntitlementResource.PORTLET_RESOURCE_TYPE, or null if dealing with the top level library entitlement.

The value of the definitionLabel argument must be the result of the getDefinitionLabel() call from the actual resource Definition.

Parameters:
webApp - The web application the Entitlements to be removed are scoped to
definitionLabel - The definition label of the resource the Entitlement is set on.

removeBookInstancePolicies

public static void removeBookInstancePolicies(String webApp,
                                              BookView bv,
                                              String portalPath,
                                              String desktopPath,
                                              HttpServletRequest request)

removeDesktopInstancePolicies

public static void removeDesktopInstancePolicies(String webApp,
                                                 DesktopView dv,
                                                 String portalPath,
                                                 String desktopPath,
                                                 HttpServletRequest request)

removeLookAndFeelDefinitionPolicies

public static void removeLookAndFeelDefinitionPolicies(String webApp,
                                                       String definitionId,
                                                       String definitionLabel,
                                                       HttpServletRequest request)

removePageDefinitionPolicies

public static void removePageDefinitionPolicies(String webApp,
                                                String definitionId,
                                                String definitionLabel,
                                                DesktopView[] desktopViews,
                                                HttpServletRequest request)

removePageInstancePolicies

public static void removePageInstancePolicies(String webApp,
                                              PageView pv,
                                              String portalPath,
                                              String desktopPath,
                                              HttpServletRequest request)

removePlaceholderDefinitionPolicy

public static void removePlaceholderDefinitionPolicy(String webApp,
                                                     PageDefinitionId pageDefId,
                                                     PlaceholderDefinitionId placeholderDefId,
                                                     HttpServletRequest request)

removePlaceholderInstancePolicy

public static void removePlaceholderInstancePolicy(DesktopDefinitionId desktopDefId,
                                                   PageDefinitionId pageDefId,
                                                   PlaceholderDefinitionId placeholderDefId,
                                                   HttpServletRequest request)

Method that unlocks a PlaceholderDefinition by removing any admin level entitlement on it.

Parameters:
request - The current HttpServletRequest

removePortletDefinitionPolicies

public static void removePortletDefinitionPolicies(String webApp,
                                                   String definitionId,
                                                   String definitionLabel,
                                                   DesktopView[] desktopViews,
                                                   HttpServletRequest request)

removePortletInstancePolicies

public static void removePortletInstancePolicies(String webApp,
                                                 PortletView pv,
                                                 String portalPath,
                                                 String desktopPath,
                                                 HttpServletRequest request)

setPlaceholderDefinitionPolicy

public static void setPlaceholderDefinitionPolicy(String webApp,
                                                  PageDefinitionId pageDefId,
                                                  PlaceholderDefinitionId placeholderDefId,
                                                  HttpServletRequest request)

setPlaceholderInstancePolicy

public static void setPlaceholderInstancePolicy(DesktopDefinitionId desktopDefId,
                                                PageDefinitionId pageDefId,
                                                PlaceholderDefinitionId placeholderDefId,
                                                HttpServletRequest request)

Method that locks a PlaceholderDefinition by setting an admin level entitlement on it. The Visitor Tools Manager API then in turn checks to see whether placeholders have this entitlement set on them, which determines whether or not a visitor is able to update a placeholder.

Parameters:
request - The current HttpServletRequest

updatePolicies

public static void updatePolicies(String webApp,
                                  String resourceType,
                                  String definitionLabel,
                                  List allRoles,
                                  String desktopId,
                                  String descriptionText,
                                  ServletRequest request)

Method that adds/removes Entitlements for a given List of Roles.

The value of the resourceType argument must be one of PortalEntitlementResource.PAGE_RESOURCE_TYPE, PortalEntitlementResource.BOOK_RESOURCE_TYPE, PortalEntitlementResource.DESKTOP_RESOURCE_TYPE, PortalEntitlementResource.LOOK_AND_FEEL_RESOURCE_TYPE, PortalEntitlementResource.PORTLET_RESOURCE_TYPE, or null if dealing with the top level library entitlement.

The value of the definitionLabel argument must be the result of the getDefinitionLabel() call from the actual resource Definition.

Parameters:
webApp - The web application the Entitlements to be updated are scoped to
resourceType - The type of the resource the Entitlement to be updated is set on.
definitionLabel - The definition label of the resource the Entitlement to be updated is set on.
allRoles - A List containing PolicyByRole objects for each Role to update
desktopId - The desktopId of the resource to update.

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved