atg.endeca.assembler.navigation
Class LiveUserState

java.lang.Object
  extended by UserState
      extended by atg.endeca.assembler.navigation.LiveUserState
Direct Known Subclasses:
ProfileUserState

public class LiveUserState
extends UserState

Extends Endeca UserState to populate its userSegments list with profile segments, the current site, and all site groups that contain the current site.


Field Summary
protected static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
LiveUserState()
           
 
Method Summary
 void computeSegments()
          Adds the IDs for current site and all site groups that contain the current site to the list of user segments to be used by the Assembler.
 java.lang.String getPrefixDelimiter()
           
 boolean getSegmentsNeeded()
           
 SiteGroupManager getSiteGroupManager()
           
 java.lang.String getSiteGroupPrefix()
           
 java.lang.String getSitePrefix()
           
 java.util.Set<java.lang.String> getUserSegments()
          Override that computes and fills in the set of active segments if it hasn't been computed yet.
 void setPrefixDelimiter(java.lang.String pPrefixDelimiter)
          Sets the delimiter that separates segment types from names.
 void setSegmentsNeeded(boolean pSegmentsNeeded)
          Sets a flag to say whether the set of segments needs to be computed.
 void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
          Sets property SiteGroupManager.
 void setSiteGroupPrefix(java.lang.String pSiteGroupPrefix)
          Sets the prefix to use with site group IDs.
 void setSitePrefix(java.lang.String pSitePrefix)
          Sets the prefix to use with the ID of the current site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

protected static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

LiveUserState

public LiveUserState()
Method Detail

setSiteGroupManager

public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets property SiteGroupManager.

Parameters:
pSiteGroupManager - the siteGroupManager

getSiteGroupManager

public SiteGroupManager getSiteGroupManager()
Returns:
property siteGroupManager.

setPrefixDelimiter

public void setPrefixDelimiter(java.lang.String pPrefixDelimiter)
Sets the delimiter that separates segment types from names.


getPrefixDelimiter

public java.lang.String getPrefixDelimiter()
Returns:
the delimiter that separates segment types from names.

setSitePrefix

public void setSitePrefix(java.lang.String pSitePrefix)
Sets the prefix to use with the ID of the current site.


getSitePrefix

public java.lang.String getSitePrefix()
Returns:
the prefix to use with the ID of the current site.

setSiteGroupPrefix

public void setSiteGroupPrefix(java.lang.String pSiteGroupPrefix)
Sets the prefix to use with site group IDs.


getSiteGroupPrefix

public java.lang.String getSiteGroupPrefix()
Returns:
the prefix to use with site group IDs.

setSegmentsNeeded

public void setSegmentsNeeded(boolean pSegmentsNeeded)
Sets a flag to say whether the set of segments needs to be computed.


getSegmentsNeeded

public boolean getSegmentsNeeded()
Returns:
the flag that says whether the set of segments needs to be computed.

getUserSegments

public java.util.Set<java.lang.String> getUserSegments()
Override that computes and fills in the set of active segments if it hasn't been computed yet.

Returns:
the user segments for the current Assembler invocation

computeSegments

public void computeSegments()
Adds the IDs for current site and all site groups that contain the current site to the list of user segments to be used by the Assembler. Each ID is prefixed by a string that identifies the type of ID (e.g., site.ATGStoreUS). The prefix strings are optional and can be used to avoid collisions among different types of IDs (site, site group, profile user segment). Prefix strings and IDs can appear in the Experience Manager UI, so the prefix strings should be user-friendly.

This method ends with debug logging for all strings in the Assembler list. Subclasses should add their entries before calling this super method to log the combined list.