atg.svc.repository.service
Class SegmentService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.repository.service.BaseService
              extended by atg.svc.repository.service.KnowledgeBaseService
                  extended by atg.svc.repository.service.SegmentService
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class SegmentService
extends KnowledgeBaseService

Service providing security through segments.


Field Summary
static java.lang.String CLASS_VERSION
           
 atg.userprofiling.ProfileTools mInternalProfileTools
           
 SiteService mSiteService
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
SegmentService()
           
 
Method Summary
 void addExternalServiceSegment(java.lang.String pSegmentName)
          Adds a new segment to the list of internal service segments.
 void addInternalServiceSegment(java.lang.String pSegmentName)
          Adds a new segment to the list of internal service segments.
 java.util.List getAllExternalProfileGroups()
          Gets all of the profile groups (user segments) in the configured external group container.
 java.util.List getAllExternalProfileGroups(boolean pServiceSegmentsOnly)
          Gets all of the profile groups (user segments) in the configured external group container.
 java.util.List getAllInternalProfileGroups()
          Gets all of the profile groups (user segments) in the configured internal group container.
 java.util.List getAllInternalProfileGroups(boolean pServiceSegmentsOnly)
          Gets all of the profile groups (user segments) in the configured internal group container.
 java.util.List getAllVisibleExternalProfileGroups()
          Returns the list of external profile groups that are visible for the current user.
 java.lang.String[] getDefaultExternalSegments()
          Gets the external segments that are assigned by default to the externalAudience property of certain objects.
 java.lang.String[] getDefaultInternalSegments()
          Gets the internal segments that are assigned by default to the internalAudience property of certain objects.
 java.lang.String getExternalEveryoneSegment()
          Gets the segment that makes an item visible to everyone external.
 java.util.Collection getExternalServiceSegments()
          Gets the list of external segments configured for service.
 atg.repository.RepositoryItemGroup getGroupBySegment(atg.svc.repository.beans.Segment pSegment)
          Returns a RepositoryItemGroup for the given Segment.
 java.lang.String getInternalEveryoneSegment()
          Gets the segment that makes an item visible to everyone internal.
 java.util.List getInternalProfileGroupMembers(java.lang.String[] pGroupNames)
          Gets the internal user profiles that belong to the given profile groups.
 atg.userprofiling.ProfileTools getInternalProfileTools()
          Gets the internal ProfileTools component.
 java.util.Collection getInternalServiceSegments()
          Gets the list of internal segments configured for service.
 java.lang.String getProfileSortProperty()
          Gets the name of the property to use when sorting profile values.
 atg.userprofiling.ProfileTools getProfileTools()
          Gets the ProfileTools component.
 atg.svc.repository.beans.Segment getSegment(java.lang.String pSegmentName, boolean pIsInternal)
          Gets a segment by name and whether it's internal or external.
 SiteService getSiteService()
          Gets the SiteService business component.
 SolutionMetadataService getSolutionMetadataService()
          Gets the FieldDefinition/SolutionClass business component.
 boolean getUseServiceSegmentsOnlyExternal()
          Returns true if the site option to use service segments only for external segments has been set to true
 java.lang.String getUseServiceSegmentsOnlyExternalOption()
          Gets name of option that decides if all or service-specific only segments are returned in certain APIs.
 boolean getUseServiceSegmentsOnlyInternal()
          Returns true if the site option to use service segments only for internal segments has been set to true
 java.lang.String getUseServiceSegmentsOnlyInternalOption()
          Gets name of option that decides if all or service-specific only segments are returned in certain APIs.
 boolean hasPermission(java.util.Collection pProfileGroupNames)
          Returns true if the user is in one of the segments in the given list.
 boolean hasPermission(java.lang.String[] pProfileGroupNames)
          Returns true if the user is in one of the segments in the given list.
 boolean isAlwaysExternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
          Returns true if the given object would be visible to everyone external.
 boolean isAlwaysExternallyVisible(java.lang.String[] pSegments)
          Returns true if the given list of segments would allow an item to be visible externally by everyone.
 boolean isAlwaysInternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
          Returns true if the given object would be visible to everyone internal.
 boolean isCurrentUserInSegment(java.lang.String pGroupName)
          Returns true if the current user belongs to the given profile group (segment) given the group name.
 boolean isCurrentUserInSegment(java.lang.String[] pGroupNames)
          Returns true if the current user belongs to any of the given segments.
 boolean isExternallyVisible(atg.svc.repository.beans.SecuredItem pObj, java.lang.String pSegment)
          Returns true if the given segment is visible based on the internalAudience of the given object.
 boolean isExternallyVisible(atg.svc.repository.beans.Solution pSolution, java.lang.String pSegment)
          Returns true if the given solution is externally visible for the given external segment.
 boolean isInternallyVisible(atg.svc.repository.beans.SecuredItem pObj, java.lang.String pSegment)
          Returns true if the given segment is visible based on the internalAudience of the given object.
 boolean isSegmentInList(java.lang.String pSegment, java.lang.String[] pSegmentList)
          Returns true if the segment is included in the given list.
 boolean isUserInSegment(atg.repository.RepositoryItem pUser, java.lang.String pGroupName)
          Returns true if the given user belongs to the given profile group (segment) given the group name.
 boolean isUserInSegment(atg.repository.RepositoryItem pProfile, java.lang.String[] pGroupNames)
          Returns true if the given user belongs to any of the given segments.
 void removeServiceSegment(java.lang.String pSegmentId)
          Removes a Segment object from the repository given the repository id.
 void setDefaultExternalAudience(atg.svc.repository.beans.SecuredItem pObject)
          Assigns the default external audience segment to the given object.
 void setDefaultExternalAudience(atg.svc.repository.beans.Solution pSolution)
          Assigns the default external audience segment to the Solution.
 void setDefaultExternalSegments(java.lang.String[] pDefaultExternalSegments)
          Sets the external segments that are assigned by default to the externalAudience property of certain objects.
 void setDefaultInternalAudience(atg.svc.repository.beans.SecuredInternalItem pObject)
          Assigns the default internal audience segment to the given SolutionClass.
 void setDefaultInternalAudience(atg.svc.repository.beans.SecuredItem pObject)
          Assigns the default internal audience segment to the given object.
 void setDefaultInternalModify(atg.svc.repository.beans.SecuredItem pObject)
          Assigns the default internal modify segment to the given object.
 void setDefaultInternalSegments(java.lang.String[] pDefaultInternalSegments)
          Sets the internal segments that are assigned by default to the internalAudience property of certain objects.
 void setDefaultSegments(atg.svc.repository.beans.SecuredItem pObject)
          Assigns the configured default segments to the given object.
 void setExternalEveryoneSegment(java.lang.String pExternalEveryoneSegment)
          Sets the segment that makes an item visible to everyone external.
 void setInternalEveryoneSegment(java.lang.String pInternalEveryoneSegment)
          Sets the segment that makes an item visible to everyone internal.
 void setInternalProfileTools(atg.userprofiling.ProfileTools pInternalProfileTools)
          Sets the internal ProfileTools component.
 void setProfileSortProperty(java.lang.String pProfileSortProperty)
          Gets the name of the property to use when sorting profile values.
 void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
          Sets the ProfileTools component.
 void setSiteService(SiteService pSiteService)
          Gets the SiteService business component.
 void setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
          Sets the FieldDefinition/SolutionClass business component.
 void setUseServiceSegmentsOnlyExternalOption(java.lang.String pUseServiceSegmentsOnlyExternalOption)
          Sets the name of option that decides if all or service-specific only segments are returned in certain APIs.
 void setUseServiceSegmentsOnlyInternalOption(java.lang.String pUseServiceSegmentsOnlyInternalOption)
          Sets the name of option that decides if all or service-specific only segments are returned in certain APIs.
 
Methods inherited from class atg.svc.repository.service.KnowledgeBaseService
getKnowledgeHomesFactory, getOptionBeanHomes, getOptionRepositoryHomes, getServiceSegmentBeanHomes, getServiceSegmentRepositoryHomes, getSolutionBeanHomes, getSolutionRepositoryHomes, getUserOptionBeanHomes, getUserOptionRepositoryHomes, setKnowledgeHomesFactory
 
Methods inherited from class atg.svc.repository.service.BaseService
getRepositoryService, getToday, setRepositoryService
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

mInternalProfileTools

public atg.userprofiling.ProfileTools mInternalProfileTools

mSiteService

public SiteService mSiteService
Constructor Detail

SegmentService

public SegmentService()
Method Detail

getSolutionMetadataService

public SolutionMetadataService getSolutionMetadataService()
Gets the FieldDefinition/SolutionClass business component.

Returns:
The SolutionMetadataService component.

setSolutionMetadataService

public void setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
Sets the FieldDefinition/SolutionClass business component.

Parameters:
pSolutionMetadataService - The SolutionMetadataService component.

getProfileTools

public atg.userprofiling.ProfileTools getProfileTools()
Gets the ProfileTools component.

Returns:
The ProfileTools component.

setProfileTools

public void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
Sets the ProfileTools component.

Parameters:
pProfileTools - The ProfileTools component.

getInternalProfileTools

public atg.userprofiling.ProfileTools getInternalProfileTools()
Gets the internal ProfileTools component.

Returns:
The internal ProfileTools component.

setInternalProfileTools

public void setInternalProfileTools(atg.userprofiling.ProfileTools pInternalProfileTools)
Sets the internal ProfileTools component.

Parameters:
pInternalProfileTools - The internal ProfileTools component.

getSiteService

public SiteService getSiteService()
Gets the SiteService business component.

Returns:
The SiteService business component.

setSiteService

public void setSiteService(SiteService pSiteService)
Gets the SiteService business component.

Parameters:
pSiteService - The SiteService business component.

getInternalEveryoneSegment

public java.lang.String getInternalEveryoneSegment()
Gets the segment that makes an item visible to everyone internal.

Returns:
The String that is the name of the segment.

setInternalEveryoneSegment

public void setInternalEveryoneSegment(java.lang.String pInternalEveryoneSegment)
Sets the segment that makes an item visible to everyone internal.

Parameters:
pInternalEveryoneSegment - The String that is the name of the segment.

getExternalEveryoneSegment

public java.lang.String getExternalEveryoneSegment()
Gets the segment that makes an item visible to everyone external.

Returns:
The String that is the name of the segment.

setExternalEveryoneSegment

public void setExternalEveryoneSegment(java.lang.String pExternalEveryoneSegment)
Sets the segment that makes an item visible to everyone external.

Parameters:
pExternalEveryoneSegment - The String that is the name of the segment.

getDefaultExternalSegments

public java.lang.String[] getDefaultExternalSegments()
Gets the external segments that are assigned by default to the externalAudience property of certain objects.

Returns:
The external segments

setDefaultExternalSegments

public void setDefaultExternalSegments(java.lang.String[] pDefaultExternalSegments)
Sets the external segments that are assigned by default to the externalAudience property of certain objects.

Parameters:
pDefaultExternalSegments - The external segments

getDefaultInternalSegments

public java.lang.String[] getDefaultInternalSegments()
Gets the internal segments that are assigned by default to the internalAudience property of certain objects.

Returns:
The internal segments

setDefaultInternalSegments

public void setDefaultInternalSegments(java.lang.String[] pDefaultInternalSegments)
Sets the internal segments that are assigned by default to the internalAudience property of certain objects.

Parameters:
pDefaultInternalSegments - The internal segments

getUseServiceSegmentsOnlyInternalOption

public java.lang.String getUseServiceSegmentsOnlyInternalOption()
Gets name of option that decides if all or service-specific only segments are returned in certain APIs.

Returns:
The name of option that decides if all or service-specific only segments are returned in certain APIs

setUseServiceSegmentsOnlyInternalOption

public void setUseServiceSegmentsOnlyInternalOption(java.lang.String pUseServiceSegmentsOnlyInternalOption)
Sets the name of option that decides if all or service-specific only segments are returned in certain APIs.

Parameters:
pUseServiceSegmentsOnlyInternalOption - name of option that decides if all or service-specific only segments are returned in certain APIs.

getUseServiceSegmentsOnlyExternalOption

public java.lang.String getUseServiceSegmentsOnlyExternalOption()
Gets name of option that decides if all or service-specific only segments are returned in certain APIs.

Returns:
The name of option that decides if all or service-specific only segments are returned in certain APIs

setUseServiceSegmentsOnlyExternalOption

public void setUseServiceSegmentsOnlyExternalOption(java.lang.String pUseServiceSegmentsOnlyExternalOption)
Sets the name of option that decides if all or service-specific only segments are returned in certain APIs.

Parameters:
pUseServiceSegmentsOnlyExternalOption - name of option that decides if all or service-specific only segments are returned in certain APIs.

getUseServiceSegmentsOnlyInternal

public boolean getUseServiceSegmentsOnlyInternal()
Returns true if the site option to use service segments only for internal segments has been set to true


getUseServiceSegmentsOnlyExternal

public boolean getUseServiceSegmentsOnlyExternal()
Returns true if the site option to use service segments only for external segments has been set to true


getProfileSortProperty

public java.lang.String getProfileSortProperty()
Gets the name of the property to use when sorting profile values.

Returns:
The String name of the property to use when sorting profile values.

setProfileSortProperty

public void setProfileSortProperty(java.lang.String pProfileSortProperty)
Gets the name of the property to use when sorting profile values.

Parameters:
pProfileSortProperty - The name of the property to use when sorting profile values

isCurrentUserInSegment

public boolean isCurrentUserInSegment(java.lang.String pGroupName)
Returns true if the current user belongs to the given profile group (segment) given the group name.

Parameters:
pGroupName - The name of the profile group (segment).
Returns:
True if the current user belongs to the given segment.

isUserInSegment

public boolean isUserInSegment(atg.repository.RepositoryItem pUser,
                               java.lang.String pGroupName)
Returns true if the given user belongs to the given profile group (segment) given the group name.

Parameters:
pUser - The user to check
pGroupName - The name of the profile group (segment).
Returns:
True if the current user belongs to the given segment.

isCurrentUserInSegment

public boolean isCurrentUserInSegment(java.lang.String[] pGroupNames)
Returns true if the current user belongs to any of the given segments.

Parameters:
pGroupNames - The list of strings to test. The strings are the group names of the profile groups (segments) in the profile repository.
Returns:
True if the current user belongs to any of the given segments.

isUserInSegment

public boolean isUserInSegment(atg.repository.RepositoryItem pProfile,
                               java.lang.String[] pGroupNames)
Returns true if the given user belongs to any of the given segments.

Parameters:
pProfile - The profile to test.
pGroupNames - The list of strings to test. The strings are the group names of the profile groups (segments) in the profile repository.
Returns:
True if the current user belongs to any of the given segments.

isSegmentInList

public boolean isSegmentInList(java.lang.String pSegment,
                               java.lang.String[] pSegmentList)
Returns true if the segment is included in the given list.

Parameters:
pSegment - The segment to find.
pSegmentList - The list to try to find it in.
Returns:
True if the segment is included in the list else false.

getInternalProfileGroupMembers

public java.util.List getInternalProfileGroupMembers(java.lang.String[] pGroupNames)
Gets the internal user profiles that belong to the given profile groups. If a profile appears in more than one profile group it will only appear once in the list that is returned. A profile only has to appear in one of the given segments to make the list. The returned collection is not ordered.

Parameters:
pGroupNames - The names of the groups to get the members of.
Returns:
The Collection of profiles in the given profile groups sorted and without duplicates.

getAllExternalProfileGroups

public java.util.List getAllExternalProfileGroups()
Gets all of the profile groups (user segments) in the configured external group container. If the admin option 'UseServiceSegmentsOnly' is set to true only the service-specific segments will be returned. Otherwise, all segments configured in the ATG Registry will be returned.

Returns:
A List of RepositoryItemGroup objects.

getAllInternalProfileGroups

public java.util.List getAllInternalProfileGroups()
Gets all of the profile groups (user segments) in the configured internal group container. If the admin option 'UseServiceSegmentsOnly' is set to true only the service-specific segments will be returned. Otherwise, all segments configured in the ATG Registry will be returned.

Returns:
A List of RepositoryItemGroup objects.

getAllExternalProfileGroups

public java.util.List getAllExternalProfileGroups(boolean pServiceSegmentsOnly)
Gets all of the profile groups (user segments) in the configured external group container.

Parameters:
pServiceSegmentsOnly - If set to true only the service-specific segments will be returned. Otherwise, all segments configured in ATG Registry will be returned.
Returns:
A List of RepositoryItemGroup objects.

getAllInternalProfileGroups

public java.util.List getAllInternalProfileGroups(boolean pServiceSegmentsOnly)
Gets all of the profile groups (user segments) in the configured internal group container.

Parameters:
pServiceSegmentsOnly - If set to true only the service-specific segments will be returned. Otherwise, all segments configured in ATG Registry will be returned.
Returns:
A List of RepositoryItemGroup objects.

isAlwaysExternallyVisible

public boolean isAlwaysExternallyVisible(java.lang.String[] pSegments)
Returns true if the given list of segments would allow an item to be visible externally by everyone.

Parameters:
pSegments - The list of segments to check against.
Returns:
True if the item would be externally visible based on the given segments else false.

isAlwaysExternallyVisible

public boolean isAlwaysExternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
Returns true if the given object would be visible to everyone external.

Parameters:
pObj - The object whose externalAudience should be checked.
Returns:
True if the item would be externally visible based on the given object externalAudience else false.

isAlwaysInternallyVisible

public boolean isAlwaysInternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
Returns true if the given object would be visible to everyone internal.

Parameters:
pObj - The object whose internalAudience should be checked.
Returns:
True if the item would be internally visible based on the given object internalAudience else false.

isExternallyVisible

public boolean isExternallyVisible(atg.svc.repository.beans.SecuredItem pObj,
                                   java.lang.String pSegment)
Returns true if the given segment is visible based on the internalAudience of the given object.

Parameters:
pObj - The object whose internalAudience should be checked.
pSegment - The segment to check against the internalAudience.
Returns:
True if the segment is contained on the internalAudience.

isExternallyVisible

public boolean isExternallyVisible(atg.svc.repository.beans.Solution pSolution,
                                   java.lang.String pSegment)
Returns true if the given solution is externally visible for the given external segment.

Parameters:
pSolution - The solution whose external audience should be checked.
pSegment - The segment to check against the external audience.
Returns:
True if the segment is contained on the external audience.

isInternallyVisible

public boolean isInternallyVisible(atg.svc.repository.beans.SecuredItem pObj,
                                   java.lang.String pSegment)
Returns true if the given segment is visible based on the internalAudience of the given object.

Parameters:
pObj - The object whose internalAudience should be checked.
pSegment - The segment to check against the internalAudience.
Returns:
True if the segment is contained on the internalAudience.

addInternalServiceSegment

public void addInternalServiceSegment(java.lang.String pSegmentName)
                               throws javax.ejb.CreateException
Adds a new segment to the list of internal service segments.

Parameters:
pSegmentName - The name of the segment (profile group) to add.
Throws:
javax.ejb.CreateException - If the create operation fails.

addExternalServiceSegment

public void addExternalServiceSegment(java.lang.String pSegmentName)
                               throws javax.ejb.CreateException
Adds a new segment to the list of internal service segments.

Parameters:
pSegmentName - The name of the segment (profile group) to add.
Throws:
javax.ejb.CreateException - If the create operation fails.

removeServiceSegment

public void removeServiceSegment(java.lang.String pSegmentId)
                          throws ObjectNotFoundException,
                                 javax.ejb.RemoveException
Removes a Segment object from the repository given the repository id.

Parameters:
pSegmentId - The repository id of the segment to remove.
Throws:
ObjectNotFoundException - If the finder fails given the parameters.
javax.ejb.RemoveException - If the remove fails.

getExternalServiceSegments

public java.util.Collection getExternalServiceSegments()
                                                throws javax.ejb.FinderException
Gets the list of external segments configured for service.

Returns:
The list of external segments (String) configured for service.
Throws:
javax.ejb.FinderException - If the finder call fails.

getInternalServiceSegments

public java.util.Collection getInternalServiceSegments()
                                                throws javax.ejb.FinderException
Gets the list of internal segments configured for service.

Returns:
The list of internal segments (String) configured for service.
Throws:
javax.ejb.FinderException - If the finder call fails.

getAllVisibleExternalProfileGroups

public java.util.List getAllVisibleExternalProfileGroups()
                                                  throws javax.ejb.FinderException
Returns the list of external profile groups that are visible for the current user. If the option to use all available groups is true, the list of all external profile groups is returned. If not, then the list of all external service segments is retrieved and filtered and the external profile groups from that list that are visible are returned.

Returns:
A List of RepositoryGroup items or the empty list if none are visible.
Throws:
javax.ejb.FinderException

getSegment

public atg.svc.repository.beans.Segment getSegment(java.lang.String pSegmentName,
                                                   boolean pIsInternal)
                                            throws ObjectNotFoundException
Gets a segment by name and whether it's internal or external.

Parameters:
pSegmentName - The name of the segment.
pIsInternal - True if the segment is internal, false if external.
Returns:
The Segment object.
Throws:
ObjectNotFoundException - If the Segment object is not found.

getGroupBySegment

public atg.repository.RepositoryItemGroup getGroupBySegment(atg.svc.repository.beans.Segment pSegment)
Returns a RepositoryItemGroup for the given Segment. The GroupContainer is based one the Segment.isInternal flag and the GroupName is take from the Segment.name property.

Parameters:
pSegment - The Segment to get the RepositoryItemGroup for.
Returns:
The RepositoryItemGroup or null if it is not found or the needed container is not configured.

hasPermission

public boolean hasPermission(java.util.Collection pProfileGroupNames)
Returns true if the user is in one of the segments in the given list. If there is no current user true is returned. If the collection is empty or null false is returned.

Parameters:
pProfileGroupNames - The list of segments to check against.
Returns:
True if the user is in one of the segments in the given list.

hasPermission

public boolean hasPermission(java.lang.String[] pProfileGroupNames)
Returns true if the user is in one of the segments in the given list. If there is no current user true is returned. If the array is empty or null false is returned.

Parameters:
pProfileGroupNames - The list of segments to check against.
Returns:
True if the user is in one of the segments in the given list.

setDefaultSegments

public void setDefaultSegments(atg.svc.repository.beans.SecuredItem pObject)
Assigns the configured default segments to the given object.

Parameters:
pObject - The object to assign the default segments to.

setDefaultExternalAudience

public void setDefaultExternalAudience(atg.svc.repository.beans.SecuredItem pObject)
Assigns the default external audience segment to the given object.

Parameters:
pObject - The object to add the segments to.

setDefaultExternalAudience

public void setDefaultExternalAudience(atg.svc.repository.beans.Solution pSolution)
Assigns the default external audience segment to the Solution.

Parameters:
pSolution - The Solution to add the segments to.

setDefaultInternalAudience

public void setDefaultInternalAudience(atg.svc.repository.beans.SecuredItem pObject)
Assigns the default internal audience segment to the given object.

Parameters:
pObject - The object to add the segments to.

setDefaultInternalAudience

public void setDefaultInternalAudience(atg.svc.repository.beans.SecuredInternalItem pObject)
Assigns the default internal audience segment to the given SolutionClass.

Parameters:
pObject - The object to add the segments to.

setDefaultInternalModify

public void setDefaultInternalModify(atg.svc.repository.beans.SecuredItem pObject)
Assigns the default internal modify segment to the given object.

Parameters:
pObject - The object to add the segments to.