|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.profiles.ProfileSetStorageManager
public class ProfileSetStorageManager
Class to manage getting and setting ProfileSet objects from the IProfileStorageHandler implementation. The IProfileStorageHandler is specified in the bowstreet.properties file by the "bowstreet.profiles.storage.handler" property.
ProfileSetDescription
,
ProfileSet
Field Summary | |
---|---|
static java.lang.String |
STORAGE_HANDLER_PROPERTY_NAME
|
Constructor Summary | |
---|---|
ProfileSetStorageManager()
Constructs a ProfileSetStorageManager using the storage handler specified by the property "bowstreet.profiles.storage.handler". |
|
ProfileSetStorageManager(java.lang.String strUserName)
Constructs a ProfileSetStorageManager using the storage handler specified by the property "bowstreet.profiles.storage.handler". |
|
ProfileSetStorageManager(java.lang.String strUserName,
java.lang.String strStorageHandlerPropertyName)
Constructs a ProfileSetStorageManager using the storage handler specified by the property passed in. |
Method Summary | |
---|---|
void |
clearChildValues(java.lang.String strProfileSetId,
java.lang.String strParentProfile,
java.lang.String strValueName,
boolean forceChangeOvewrite)
This will clear the values of the specified children profiles. |
boolean |
doesProfileSetExist(java.lang.String strName)
Looks for a ProfileSet for the specified Profile Set ID. |
java.util.Iterator |
getChildProfiles(java.lang.String profileSetName,
java.lang.String parentProfile,
boolean onlyContainers)
Gets an Iterator of ProfileDescription objects for the children of the specified parent Profile. |
long |
getLastModified(java.lang.String profileSetName,
java.lang.String profileName)
Returns the last time the specified Profile was modified. |
java.util.Iterator |
getProfilesBySegment(java.lang.String profileSetName,
java.util.Iterator segments)
Gets an Iterator of ProfileDescription objects for Profiles that match one of the specified segments. |
ProfileSet |
getProfileSet(java.lang.String profileSetName)
Gets a ProfileSet for the specified ProfileSet Name. |
ProfileSet |
getProfileSet(java.lang.String profileSetName,
java.util.Iterator profileNames)
Gets a ProfileSet that is populated with the specified Profiles from the Iterator of Profile names. |
ProfileSet |
getProfileSet(java.lang.String profileSetName,
java.lang.String profileName)
Gets a ProfileSet that is populated with the specified Profile. |
ProfileSetDescription |
getProfileSetDescription(java.lang.String strId)
Gets a specified ProfileSet's, ProfileSetDescription. |
java.util.List |
getProfileSetDescriptions()
Gets a list of all of the ProfileSetDescription's for the entire system. |
java.util.List |
getProfileSetDescriptions(long time)
Gets a list of all of the ProfileSetDescription's who's last modified time stamp is greater that the specified. |
java.util.List |
getSegmentsInUse(java.lang.String profileSetName)
Gets an List of segment names used by the specified ProfileSet. |
long |
lastModified(java.lang.String strName)
Gets the last modified time of a specified profile. |
boolean |
removeProfileSet(java.lang.String strName)
Removes an existing ProfileSet with the specified name. |
void |
renameProfile(java.lang.String profileSetName,
java.lang.String profileName,
java.lang.String newName)
Renames an existing Profile and fix up any parent/child dependencies. |
void |
saveProfileData(ProfileSet profileSet,
ProfileSet originalProfileSet,
boolean forceChangeOvewrite)
Adds or modifies only the Profiles of specified ProfileSet. |
void |
saveProfileSet(ProfileSet profileSet,
boolean forceChangeOvewrite)
Adds or modifies the entire specified ProfileSet. |
void |
saveProfileSet(ProfileSet profileSet,
ProfileSet originalProfileSet,
boolean forceChangeOvewrite)
Adds or modifies the ProfilesDef, Profiles, strProfileSelectionClass and strValueClass of the specified ProfileSet. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STORAGE_HANDLER_PROPERTY_NAME
Constructor Detail |
---|
public ProfileSetStorageManager()
IProfileSetStorage
public ProfileSetStorageManager(java.lang.String strUserName)
strUserName
- The name of the current user. Used to trace who has modified the ProfileSet.IProfileSetStorage
public ProfileSetStorageManager(java.lang.String strUserName, java.lang.String strStorageHandlerPropertyName)
strUserName
- The name of the current user. Used to trace who has modified the ProfileSet.strStorageHandlerPropertyName
- The name of the property that contains the class name for the storage handler.IProfileSetStorage
Method Detail |
---|
public void clearChildValues(java.lang.String strProfileSetId, java.lang.String strParentProfile, java.lang.String strValueName, boolean forceChangeOvewrite) throws ProfileException, com.bowstreet.profiles.ProfileSetChangedException
strProfileSetId
- The unique ID of the ProfileSet to operate on.strParentProfile
- The unique ID of the parent profile who's children will be effected.strValueName
- The name of the value to clear.forceChangeOvewrite
- If set to false and the ProfileSet already exists with a lastmodified time is greater than the specified ProfileSet and exception will be thrown. If true the ProfileSet will be overwritten.
ProfileException
- On error.
ProfileSetChangedException
- if ProfileSet has been modified since the specified ProfileSet was read.updateProfilesChanged
public boolean doesProfileSetExist(java.lang.String strName)
strName
- The unique ID of the requested Profile Set.
ProfileSet
public java.util.Iterator getChildProfiles(java.lang.String profileSetName, java.lang.String parentProfile, boolean onlyContainers) throws ProfileException
profileSetName
- The name of the ProfileSet to operate on.parentProfile
- The name of the parent Profile within the ProfileSet.onlyContainers
- If true then only container Profiles will be included in the results, if false then all children will be included.
ProfileException
- On error.ProfileDescription
// Gets all of the root level container profiles Iterator iterator = profileSetStorageManager.getChildProfiles("myProfileSet", "Default", true); // Gets all of the child profiles of "Acme.HR" Iterator iterator = profileSetStorageManager.getChildProfiles("myProfileSet", "Acme.HR", false);
public long getLastModified(java.lang.String profileSetName, java.lang.String profileName) throws ProfileException
profileSetName
- The name of the ProfileSet that contains the Profile.profileName
- The name of the Profile to get last modified time of.
ProfileException
- On error.public java.util.Iterator getProfilesBySegment(java.lang.String profileSetName, java.util.Iterator segments) throws ProfileException
profileSetName
- The ProfileSet to find the matching profile on.segments
- An Iterator of segment names that the user is in.
ProfileException
public ProfileSet getProfileSet(java.lang.String profileSetName) throws ProfileException
profileSetName
- The unique name of the requested ProfileSet.
ProfileException
- On errorProfileSet
public ProfileSet getProfileSet(java.lang.String profileSetName, java.util.Iterator profileNames) throws ProfileException
Note - This will also bring in all of the parents of the specified profiles.
profileSetName
- The name of the ProfileSet to retrieve.profileNames
- The names of the Profiles to populate the ProfileSet with.
ProfileException
- On error.public ProfileSet getProfileSet(java.lang.String profileSetName, java.lang.String profileName) throws ProfileException
Note - This will also bring in all of the parents of the specified profile.
profileSetName
- The name of the ProfileSet to retrieve.profileName
- The name of the Profile to populate the ProfileSet with.
ProfileException
- On error.public ProfileSetDescription getProfileSetDescription(java.lang.String strId) throws ProfileException
strId
- The unique ID of the requested ProfileSet, ProfileSetDescription.
ProfileException
- On errorProfileSetDescription
,
ProfileSet
public java.util.List getProfileSetDescriptions() throws ProfileException
ProfileException
- On errorProfileSetDescription
,
ProfileSet
public java.util.List getProfileSetDescriptions(long time) throws ProfileException
time
- The time in milliseconds to compare against.
ProfileException
- On errorProfileSetDescription
,
ProfileSet
public java.util.List getSegmentsInUse(java.lang.String profileSetName) throws ProfileException
profileSetName
- The name of the ProfileSet to get all the segment names used.
ProfileException
- On error.public long lastModified(java.lang.String strName) throws ProfileException
strName
- The name of the ProfileSet to get the last modified time for.
ProfileException
- On error.public boolean removeProfileSet(java.lang.String strName) throws ProfileException
strName
- The name of the ProfileSet to remove.
ProfileException
- On error.ProfileSet
public void renameProfile(java.lang.String profileSetName, java.lang.String profileName, java.lang.String newName) throws ProfileException
profileSetName
- The name of the ProfileSet to operate on.profileName
- The existing profile to be renamed. This must be the fully qualified profile name (e.g. "Acme.HR").newName
- The new profile name (e.g. "Sales").
ProfileException
- On error.public void saveProfileData(ProfileSet profileSet, ProfileSet originalProfileSet, boolean forceChangeOvewrite) throws ProfileException, com.bowstreet.profiles.ProfileSetChangedException
profileSet
- The ProfileSet to modify.originalProfileSet
- The original ProfileSet to compare against or null if there was no original.forceChangeOvewrite
- If set to false and the ProfileSet already exists with a lastmodified time is greater than the specified ProfileSet and exception will be thrown. If true the ProfileSet will be overwritten.
ProfileException
- On error.
ProfileSetChangedException
- if ProfileSet has been modified since the specified ProfileSet was read.updateProfilesChanged
public void saveProfileSet(ProfileSet profileSet, boolean forceChangeOvewrite) throws ProfileException, com.bowstreet.profiles.ProfileSetChangedException
profileSet
- The ProfileSet to add or modify.forceChangeOvewrite
- If set to false and the ProfileSet already exists with a lastmodified time is greater than the specified ProfileSet and exception will be thrown. If true the ProfileSet will be overwritten.
ProfileException
- On error.
ProfileSetChangedException
- if ProfileSet has been modified since the specified ProfileSet was read.ProfileSet
public void saveProfileSet(ProfileSet profileSet, ProfileSet originalProfileSet, boolean forceChangeOvewrite) throws ProfileException, com.bowstreet.profiles.ProfileSetChangedException
profileSet
- The ProfileSet to modify.originalProfileSet
- The original ProfileSet to compare against or null if there was no original.forceChangeOvewrite
- If set to false and the ProfileSet already exists with a lastmodified time is greater than the specified ProfileSet and exception will be thrown. If true the ProfileSet will be overwritten.
ProfileException
- On error.
ProfileSetChangedException
- if ProfileSet has been modified since the specified ProfileSet was read.updateProfilesChanged
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |