|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.profiles.NamedObject
com.bowstreet.profiles.Profile
public class Profile
Class that represents a single Profile object from within a ProfileSet
ProfileSet
,
Serialized FormField Summary |
---|
Fields inherited from interface com.bowstreet.profiles.IProfileDefines |
---|
CURRENT_CUSTOM_VALUE_PSET, CUSTOM_VALUE_MAP_KEY, DEFAULT, DESCRIPTION, EDIT_STATUS, EDITABLE, EFFECTS_CHILD, emptyIterator, ENTRIES, ENTRY, EXTRA_DATA, FALSE, FINAL_LOCKED, FINAL_LOCKED_STR, INHERITED_FROM, INHERITED_LOCKED, INHERITED_LOCKED_STR, IS_CONTAINER, IS_FINAL, IS_INHERITED, IS_RUNTIME, LAST_MODIFIED, LAST_MODIFIED_BY, MODEL, MODELS, NAME, PARENT, PC_ALREADY_CONVERTED, PC_INVALID_DATA, PC_NO_PROFILE, PC_OK, PROFILE, PROFILE_ATTR, PROFILE_DEF, PROFILE_SET, PROFILE_SET_MAP_PREVIEW_KEY, PROFILED, PROFILES, PROMPT, ROLE, ROLE_SELECTION_CLASS, ROLES, TRUE, TYPE, UI, USE_FULL_NAMES, VALUE, VALUE_CLASS, VALUES |
Constructor Summary | |
---|---|
Profile(IXml tdProfile)
Constructs a Profile from an IXml object. |
|
Profile(java.lang.String name)
Constructs a new Profile and sets its name and its parents name to the Default profile. |
|
Profile(java.lang.String name,
java.lang.String parentName)
Constructs a new Profile and sets its name and parent name. |
Method Summary | |
---|---|
void |
addRole(java.lang.String role)
Adds a single Role to this Profile. |
void |
addValue(ProfileValue profileValue)
Adds a single ProfileValue to this Profile. |
java.lang.Object |
clone()
Creates and returns a copy of this Profile. |
boolean |
containsRole(java.lang.String role)
Checks to see if a specified role exists for this Profile. |
boolean |
containsValue(java.lang.String name)
Checks to see if a value exists for the specified value name. |
boolean |
equals(java.lang.Object obj)
Compare two Profile's. |
IXml |
getAsIXml(boolean getAll)
Gets the entire Profile as IXml. |
int |
getDepth()
Gets the hierarchy depth of this Profile. |
long |
getLastModified()
Gets the last time this profile was modified. |
java.lang.String |
getParent()
Gets the name of the parent Profile. |
java.util.Iterator |
getRoles()
Gets a Iterator to a list of all of the Roles for this Profile. |
java.lang.String |
getShortName()
Gets the non-qualified name of this Profile. |
ProfileValue |
getValue(java.lang.String name)
Gets a specified ProfileValue object by name. |
java.util.Iterator |
getValues()
Gets a Map Iterator of all of the ProfileValue's for this Profile. |
boolean |
hasChanged()
Checks to see if this Profile different that the original. |
boolean |
isCalculated()
Checks to see if the values have been calculated from profile hierarchy. |
boolean |
isContainer()
Gets if this Profile is a container, which specifies that this Profile may have child Profile nodes. |
boolean |
isDefault()
Checks if this profile is the default. |
void |
modifyValue(ProfileValue profileValue)
Modifies an existing ProfileValue in this Profile. |
void |
removeAllRoles()
Removes all of the Roles from this Profile. |
void |
removeRole(java.lang.String role)
Removes the specified Role from this Profile. |
void |
removeValue(java.lang.String name)
Removes the specified ProfileValue by name from this Profile. |
boolean |
rolesExist()
Checks to see if there are any Roles associated with this Profile. |
void |
setCalculated(boolean isCalculated)
Sets if the values have been calculated from profile hierarchy. |
void |
setFromIXml(IXml tdProfile)
Sets the entire Profile from a IXml. |
void |
setIsContainer(boolean isContainer)
Sets if this Profile is a container, which specifies that this Profile may have child Profile nodes. |
void |
setLastModified(long lastModified)
Sets the last time this profile was modified. |
void |
setName(java.lang.String name)
Sets the name of this Profile. |
void |
setParent(java.lang.String parentName)
Sets the name of the parent for this Profile. |
void |
setRoles(java.util.Vector roles)
Sets a list of all of the Roles for this Profile. |
java.lang.String |
toString()
Gets a String of all the Profile data for debugging only |
void |
update(com.bowstreet.profiles.IXmlDataAccess item)
Updates from an existing Profile. |
Methods inherited from class com.bowstreet.profiles.NamedObject |
---|
getName |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.bowstreet.profiles.ProfileDescription |
---|
getName |
Constructor Detail |
---|
public Profile(IXml tdProfile) throws ProfileException
tdProfile
- An XML representation of a Profile Object.
ProfileException
- if duplicate name in entry.public Profile(java.lang.String name)
name
- The name of the Profile being created (e.g. "gold").
This must always be the short name.ProfileSetStorageManager.getChildProfiles(String, String, boolean)
,
setIsContainer(boolean)
Profile profile = new Profile("gold");
public Profile(java.lang.String name, java.lang.String parentName)
name
- The name of the Profile being created (e.g. "gold").
This must always be the short name.parentName
- The name of parent for this profile.
If using qualified profile names the parentName name specified must be the full name of the Profile (e.g. "acme.serviceLevel").
If not using qualified profile names the parentName specified must be the just the name of the profile itself (e.g. "serviceLevel").ProfileSetStorageManager.getChildProfiles(String, String, boolean)
,
setIsContainer(boolean)
Profile profile = new Profile("gold", "acme.serviceLevel"); Profile profile = new Profile("gold", parentProfile.getName());
Method Detail |
---|
public void addRole(java.lang.String role)
role
- A Role name to add.public void addValue(ProfileValue profileValue) throws ProfileException
profileValue
- The ProfileValue objects to add.
ProfileException
- if the ProfileValue name already exists.ProfileValue
public java.lang.Object clone()
clone
in interface com.bowstreet.profiles.IXmlDataAccess
clone
in class NamedObject
public boolean containsRole(java.lang.String role)
role
- The nameof the Role to check.
public boolean containsValue(java.lang.String name)
name
- The name of the value.
ProfileValue
public boolean equals(java.lang.Object obj)
equals
in class NamedObject
obj
- The Profile to compare against.
public IXml getAsIXml(boolean getAll) throws ProfileException
getAsIXml
in interface com.bowstreet.profiles.IXmlDataAccess
getAll
- specifies if all of the data should be returned. This is used to remove any calculated of UI specific data.
ProfileException
- On error.IXml
public final int getDepth()
public long getLastModified()
public java.lang.String getParent()
getParent
in interface ProfileDescription
public java.util.Iterator getRoles()
public java.lang.String getShortName()
getShortName
in interface ProfileDescription
public ProfileValue getValue(java.lang.String name)
name
- The name of the ProfileValue to get.
ProfileValue
public java.util.Iterator getValues()
ProfileValue
public boolean hasChanged()
public boolean isCalculated()
public boolean isContainer()
isContainer
in interface ProfileDescription
ProfileSetStorageManager.getChildProfiles(String, String, boolean)
public boolean isDefault()
public void modifyValue(ProfileValue profileValue) throws ProfileException
profileValue
- The ProfileValue objects to modify.
ProfileException
- On error.ProfileValue
public void removeAllRoles()
public void removeRole(java.lang.String role)
role
- The name of the Role to remove.public void removeValue(java.lang.String name)
name
- The name of the value to be removed.ProfileValue
public boolean rolesExist()
public void setCalculated(boolean isCalculated)
isCalculated
- true to specify that the values have been calculated, else false.public void setFromIXml(IXml tdProfile) throws ProfileException
setFromIXml
in interface com.bowstreet.profiles.IXmlDataAccess
tdProfile
- The IXml representation of a Profile.
ProfileException
- On error.IXml
public void setIsContainer(boolean isContainer)
isContainer
- true if this Profile is a container, else false.ProfileSetStorageManager.getChildProfiles(String, String, boolean)
public void setLastModified(long lastModified)
lastModified
- The last time this profile was modified.public void setName(java.lang.String name)
setName
in interface com.bowstreet.profiles.IXmlDataAccess
setName
in class NamedObject
name
- The name of this Profile.public void setParent(java.lang.String parentName)
parentName
- The parent name for this Profile.public void setRoles(java.util.Vector roles)
roles
- A List of Strings that represent the Role names.public java.lang.String toString()
toString
in class java.lang.Object
public void update(com.bowstreet.profiles.IXmlDataAccess item)
update
in interface com.bowstreet.profiles.IXmlDataAccess
update
in class NamedObject
item
- The IXmlDataAccess, which must be a Profile.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |