|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.svc.repository.service.BaseService
atg.svc.repository.service.KnowledgeBaseService
atg.svc.repository.service.SegmentService
public class SegmentService
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 |
---|
public static final java.lang.String CLASS_VERSION
public atg.userprofiling.ProfileTools mInternalProfileTools
public SiteService mSiteService
Constructor Detail |
---|
public SegmentService()
Method Detail |
---|
public SolutionMetadataService getSolutionMetadataService()
public void setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
pSolutionMetadataService
- The SolutionMetadataService component.public atg.userprofiling.ProfileTools getProfileTools()
public void setProfileTools(atg.userprofiling.ProfileTools pProfileTools)
pProfileTools
- The ProfileTools component.public atg.userprofiling.ProfileTools getInternalProfileTools()
public void setInternalProfileTools(atg.userprofiling.ProfileTools pInternalProfileTools)
pInternalProfileTools
- The internal ProfileTools component.public SiteService getSiteService()
public void setSiteService(SiteService pSiteService)
pSiteService
- The SiteService business component.public java.lang.String getInternalEveryoneSegment()
public void setInternalEveryoneSegment(java.lang.String pInternalEveryoneSegment)
pInternalEveryoneSegment
- The String that is the name of the segment.public java.lang.String getExternalEveryoneSegment()
public void setExternalEveryoneSegment(java.lang.String pExternalEveryoneSegment)
pExternalEveryoneSegment
- The String that is the name of the segment.public java.lang.String[] getDefaultExternalSegments()
public void setDefaultExternalSegments(java.lang.String[] pDefaultExternalSegments)
pDefaultExternalSegments
- The external segmentspublic java.lang.String[] getDefaultInternalSegments()
public void setDefaultInternalSegments(java.lang.String[] pDefaultInternalSegments)
pDefaultInternalSegments
- The internal segmentspublic java.lang.String getUseServiceSegmentsOnlyInternalOption()
public void setUseServiceSegmentsOnlyInternalOption(java.lang.String pUseServiceSegmentsOnlyInternalOption)
pUseServiceSegmentsOnlyInternalOption
- name of option that decides if all or service-specific only segments are
returned in certain APIs.public java.lang.String getUseServiceSegmentsOnlyExternalOption()
public void setUseServiceSegmentsOnlyExternalOption(java.lang.String pUseServiceSegmentsOnlyExternalOption)
pUseServiceSegmentsOnlyExternalOption
- name of option that decides if all or service-specific only segments are
returned in certain APIs.public boolean getUseServiceSegmentsOnlyInternal()
public boolean getUseServiceSegmentsOnlyExternal()
public java.lang.String getProfileSortProperty()
public void setProfileSortProperty(java.lang.String pProfileSortProperty)
pProfileSortProperty
- The name of the property to use when sorting profile valuespublic boolean isCurrentUserInSegment(java.lang.String pGroupName)
pGroupName
- The name of the profile group (segment).
public boolean isUserInSegment(atg.repository.RepositoryItem pUser, java.lang.String pGroupName)
pUser
- The user to checkpGroupName
- The name of the profile group (segment).
public boolean isCurrentUserInSegment(java.lang.String[] pGroupNames)
pGroupNames
- The list of strings to test. The strings are the group names of the profile groups (segments) in the profile
repository.
public boolean isUserInSegment(atg.repository.RepositoryItem pProfile, java.lang.String[] pGroupNames)
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.
public boolean isSegmentInList(java.lang.String pSegment, java.lang.String[] pSegmentList)
pSegment
- The segment to find.pSegmentList
- The list to try to find it in.
public java.util.List getInternalProfileGroupMembers(java.lang.String[] pGroupNames)
pGroupNames
- The names of the groups to get the members of.
public java.util.List getAllExternalProfileGroups()
public java.util.List getAllInternalProfileGroups()
public java.util.List getAllExternalProfileGroups(boolean pServiceSegmentsOnly)
pServiceSegmentsOnly
- If set to true only the service-specific segments will be returned. Otherwise, all
segments configured in ATG Registry will be returned.
public java.util.List getAllInternalProfileGroups(boolean pServiceSegmentsOnly)
pServiceSegmentsOnly
- If set to true only the service-specific segments will be returned. Otherwise, all
segments configured in ATG Registry will be returned.
public boolean isAlwaysExternallyVisible(java.lang.String[] pSegments)
pSegments
- The list of segments to check against.
public boolean isAlwaysExternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
pObj
- The object whose externalAudience should be checked.
public boolean isAlwaysInternallyVisible(atg.svc.repository.beans.SecuredItem pObj)
pObj
- The object whose internalAudience should be checked.
public boolean isExternallyVisible(atg.svc.repository.beans.SecuredItem pObj, java.lang.String pSegment)
pObj
- The object whose internalAudience should be checked.pSegment
- The segment to check against the internalAudience.
public boolean isExternallyVisible(atg.svc.repository.beans.Solution pSolution, java.lang.String pSegment)
pSolution
- The solution whose external audience should be checked.pSegment
- The segment to check against the external audience.
public boolean isInternallyVisible(atg.svc.repository.beans.SecuredItem pObj, java.lang.String pSegment)
pObj
- The object whose internalAudience should be checked.pSegment
- The segment to check against the internalAudience.
public void addInternalServiceSegment(java.lang.String pSegmentName) throws javax.ejb.CreateException
pSegmentName
- The name of the segment (profile group) to add.
javax.ejb.CreateException
- If the create operation fails.public void addExternalServiceSegment(java.lang.String pSegmentName) throws javax.ejb.CreateException
pSegmentName
- The name of the segment (profile group) to add.
javax.ejb.CreateException
- If the create operation fails.public void removeServiceSegment(java.lang.String pSegmentId) throws ObjectNotFoundException, javax.ejb.RemoveException
pSegmentId
- The repository id of the segment to remove.
ObjectNotFoundException
- If the finder fails given the parameters.
javax.ejb.RemoveException
- If the remove fails.public java.util.Collection getExternalServiceSegments() throws javax.ejb.FinderException
javax.ejb.FinderException
- If the finder call fails.public java.util.Collection getInternalServiceSegments() throws javax.ejb.FinderException
javax.ejb.FinderException
- If the finder call fails.public java.util.List getAllVisibleExternalProfileGroups() throws javax.ejb.FinderException
javax.ejb.FinderException
public atg.svc.repository.beans.Segment getSegment(java.lang.String pSegmentName, boolean pIsInternal) throws ObjectNotFoundException
pSegmentName
- The name of the segment.pIsInternal
- True if the segment is internal, false if external.
ObjectNotFoundException
- If the Segment object is not found.public atg.repository.RepositoryItemGroup getGroupBySegment(atg.svc.repository.beans.Segment pSegment)
pSegment
- The Segment to get the RepositoryItemGroup for.
public boolean hasPermission(java.util.Collection pProfileGroupNames)
pProfileGroupNames
- The list of segments to check against.
public boolean hasPermission(java.lang.String[] pProfileGroupNames)
pProfileGroupNames
- The list of segments to check against.
public void setDefaultSegments(atg.svc.repository.beans.SecuredItem pObject)
pObject
- The object to assign the default segments to.public void setDefaultExternalAudience(atg.svc.repository.beans.SecuredItem pObject)
pObject
- The object to add the segments to.public void setDefaultExternalAudience(atg.svc.repository.beans.Solution pSolution)
pSolution
- The Solution to add the segments to.public void setDefaultInternalAudience(atg.svc.repository.beans.SecuredItem pObject)
pObject
- The object to add the segments to.public void setDefaultInternalAudience(atg.svc.repository.beans.SecuredInternalItem pObject)
pObject
- The object to add the segments to.public void setDefaultInternalModify(atg.svc.repository.beans.SecuredItem pObject)
pObject
- The object to add the segments to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |