Package com.sun.identity.entitlement
Class Application
- java.lang.Object
-
- com.sun.identity.entitlement.Application
-
-
Field Summary
Fields Modifier and Type Field Description static StringCREATED_BY_ATTRIBUTECreated by index keystatic StringCREATION_DATE_ATTRIBUTECreation date index keystatic StringDESCRIPTION_ATTRIBUTEDescription attribute name,static StringLAST_MODIFIED_BY_ATTRIBUTELast modified by index keystatic StringLAST_MODIFIED_DATE_ATTRIBUTELast modified date index keystatic StringNAME_ATTRIBUTEName attribute name,
-
Constructor Summary
Constructors Constructor Description Application()Public, default constructorApplication(String name, ApplicationType applicationType)Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllResourceTypeUuids(Set<String> resourceTypeUuids)Adds the passed set of resource type UUIDs to the application.voidaddAttributeNames(Set<String> names)Adds attribute names.voidaddResourceTypeUuid(String resourceTypeUuid)Adds the passed resource type UUID to the application.booleancanBeDeleted(String realm)Applicationclone()protected voidcloneAppl(Application clone)ApplicationTypegetApplicationType()Returns application type.Set<String>getAttributeNames()Return attribute names.Set<String>getConditions()Returns set of supported condition class names.StringgetCreatedBy()Returns the user ID who created the policy.longgetCreationDate()Returns creation date.StringgetDescription()Returns description.StringgetDisplayName()Returns application display name.EntitlementCombinergetEntitlementCombiner()Returns a new instance of entitlement combiner.ClassgetEntitlementCombinerClass()Returns entitlement combiner class.StringgetLastModifiedBy()Returns the user ID who last modified the policy.longgetLastModifiedDate()Returns last modified date.Set<String>getMetaData()Returns meta information.StringgetName()Returns application name.ResourceNamegetResourceComparator()Returns resource comparator for this Application, defaulting to the ApplicationType's resource comparator if none is directly associated with this Application.ResourceNamegetResourceComparator(boolean defaultToAppType)Returns resource comparator for this Application.ClassgetResourceComparatorClass()Returns resource comparator class.ResourceSaveIndexesgetResourceSaveIndex(String resource)Returns save indexes for a given resource.ResourceSearchIndexesgetResourceSearchIndex(String resource, String realm)Returns search indexes for a given resource.Set<String>getResourceTypeUuids()Retrieves the resource type UUIDs associated with the application.ISaveIndexgetSaveIndex()Returns save indexClassgetSaveIndexClass()Returns save index class.ISearchIndexgetSearchIndex()Returns search indexClassgetSearchIndexClass()Returns search index class.Set<String>getSubjects()Returns set of supported subject class names.booleanisEditable()An Application is editable if it can be changed by an end user.voidremoveResourceTypeUuid(String resourceTypeUuid)Removes the passed resource type UUID from the application.voidsetApplicationType(ApplicationType applicationType)Sets the application type of this ApplicationvoidsetAttributeNames(Set<String> names)Sets attribute names.voidsetConditions(Set<String> conditions)Sets supported condition class names.voidsetCreatedBy(String createdBy)Sets the user ID who created the policy.voidsetCreationDate(long creationDate)Sets the creation date.voidsetDescription(String description)Set description.voidsetDisplayName(String displayName)Sets the application display name.voidsetEntitlementCombiner(Class entitlementCombiner)Sets entitlement combiner.voidsetEntitlementCombinerName(Class<? extends EntitlementCombiner> entitlementCombiner)Sets entitlement combiner using theEntitlementRegistryto look up the appropriate class.voidsetLastModifiedBy(String lastModifiedBy)Sets the user ID who last modified the policy.voidsetLastModifiedDate(long lastModifiedDate)Sets the last modified date.voidsetMetaData(Set<String> meta)voidsetName(String name)voidsetResourceComparator(Class resourceComparator)Sets resource comparator.voidsetSaveIndex(Class saveIndex)Sets save index.voidsetSearchIndex(Class searchIndex)Sets search index generator.voidsetSubjects(Set<String> subjects)Sets supported subject class names.
-
-
-
Field Detail
-
CREATED_BY_ATTRIBUTE
public static final String CREATED_BY_ATTRIBUTE
Created by index key- See Also:
- Constant Field Values
-
LAST_MODIFIED_BY_ATTRIBUTE
public static final String LAST_MODIFIED_BY_ATTRIBUTE
Last modified by index key- See Also:
- Constant Field Values
-
CREATION_DATE_ATTRIBUTE
public static final String CREATION_DATE_ATTRIBUTE
Creation date index key- See Also:
- Constant Field Values
-
LAST_MODIFIED_DATE_ATTRIBUTE
public static final String LAST_MODIFIED_DATE_ATTRIBUTE
Last modified date index key- See Also:
- Constant Field Values
-
NAME_ATTRIBUTE
public static final String NAME_ATTRIBUTE
Name attribute name,- See Also:
- Constant Field Values
-
DESCRIPTION_ATTRIBUTE
public static final String DESCRIPTION_ATTRIBUTE
Description attribute name,- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Application
public Application()
Public, default constructor
-
Application
public Application(String name, ApplicationType applicationType)
Constructs an instance.- Parameters:
name- Name of Application.applicationType- Its application type.
-
-
Method Detail
-
setApplicationType
public void setApplicationType(ApplicationType applicationType)
Sets the application type of this Application- Parameters:
applicationType- The non-null application type
-
clone
public Application clone()
-
cloneAppl
protected void cloneAppl(Application clone)
-
getApplicationType
public ApplicationType getApplicationType()
Returns application type.- Returns:
- application type.
-
getConditions
public Set<String> getConditions()
Returns set of supported condition class names.- Returns:
- set of supported condition class names.
-
getSubjects
public Set<String> getSubjects()
Returns set of supported subject class names.- Returns:
- set of supported subject class names.
-
getEntitlementCombinerClass
public Class getEntitlementCombinerClass()
Returns entitlement combiner class.- Returns:
- entitlement combiner class.
-
getEntitlementCombiner
public EntitlementCombiner getEntitlementCombiner()
Returns a new instance of entitlement combiner.- Returns:
- an instance of entitlement combiner.
-
getName
public String getName()
Returns application name.- Returns:
- application name.
-
getDisplayName
public String getDisplayName()
Returns application display name.- Returns:
- application display name.
-
setConditions
public void setConditions(Set<String> conditions)
Sets supported condition class names.- Parameters:
conditions- Supported condition class names.
-
setSubjects
public void setSubjects(Set<String> subjects)
Sets supported subject class names.- Parameters:
subjects- Supported subject class names.
-
setSaveIndex
public void setSaveIndex(Class saveIndex) throws InstantiationException, IllegalAccessException
Sets save index.- Parameters:
saveIndex- save index.- Throws:
InstantiationExceptionIllegalAccessException
-
setSearchIndex
public void setSearchIndex(Class searchIndex) throws InstantiationException, IllegalAccessException
Sets search index generator.- Parameters:
searchIndex- search index generator.- Throws:
InstantiationExceptionIllegalAccessException
-
setEntitlementCombiner
public void setEntitlementCombiner(Class entitlementCombiner)
Sets entitlement combiner.- Parameters:
entitlementCombiner- entitlement combiner.
-
setEntitlementCombinerName
public void setEntitlementCombinerName(Class<? extends EntitlementCombiner> entitlementCombiner)
Sets entitlement combiner using theEntitlementRegistryto look up the appropriate class.- Parameters:
entitlementCombiner- name of the entitlement combiner to look up
-
setResourceComparator
public void setResourceComparator(Class resourceComparator) throws InstantiationException, IllegalAccessException
Sets resource comparator.- Parameters:
resourceComparator- resource comparator.- Throws:
InstantiationExceptionIllegalAccessException
-
getResourceTypeUuids
public Set<String> getResourceTypeUuids()
Retrieves the resource type UUIDs associated with the application.- Returns:
- The set of associated resource type UUIDs.
-
addAllResourceTypeUuids
public void addAllResourceTypeUuids(Set<String> resourceTypeUuids)
Adds the passed set of resource type UUIDs to the application.- Parameters:
resourceTypeUuids- The set of resource type UUIDs.
-
addResourceTypeUuid
public void addResourceTypeUuid(String resourceTypeUuid)
Adds the passed resource type UUID to the application.- Parameters:
resourceTypeUuid- The resource type UUID.
-
removeResourceTypeUuid
public void removeResourceTypeUuid(String resourceTypeUuid)
Removes the passed resource type UUID from the application.- Parameters:
resourceTypeUuid- The resource type UUID.
-
getResourceSearchIndex
public ResourceSearchIndexes getResourceSearchIndex(String resource, String realm) throws EntitlementException
Returns search indexes for a given resource.- Parameters:
resource- Resource to generate the indexes.realm- Current realm to be searched.- Returns:
- Search indexes.
- Throws:
EntitlementException- When an error occurs in the entitlements framework.
-
getResourceSaveIndex
public ResourceSaveIndexes getResourceSaveIndex(String resource)
Returns save indexes for a given resource.- Parameters:
resource- resource to generate the indexes.- Returns:
- save indexes.
-
getSaveIndexClass
public Class getSaveIndexClass()
Returns save index class.- Returns:
- save index class.
-
getSearchIndexClass
public Class getSearchIndexClass()
Returns search index class.- Returns:
- search index class.
-
getResourceComparatorClass
public Class getResourceComparatorClass()
Returns resource comparator class.- Returns:
- resource comparator class.
-
getResourceComparator
public ResourceName getResourceComparator()
Returns resource comparator for this Application, defaulting to the ApplicationType's resource comparator if none is directly associated with this Application.- Returns:
- resource comparator, which may be null.
-
getResourceComparator
public ResourceName getResourceComparator(boolean defaultToAppType)
Returns resource comparator for this Application.- Parameters:
defaultToAppType- iftrue, will return this Application's ApplicationType resource comparator if none is set on the Application.- Returns:
- resource comparator, which may be null.
-
setAttributeNames
public void setAttributeNames(Set<String> names)
Sets attribute names.- Parameters:
names- Attribute names.
-
addAttributeNames
public void addAttributeNames(Set<String> names)
Adds attribute names.- Parameters:
names- Attribute names.
-
getSaveIndex
public ISaveIndex getSaveIndex()
Returns save index- Returns:
- save index
-
getSearchIndex
public ISearchIndex getSearchIndex()
Returns search index- Returns:
- search index
-
getAttributeNames
public Set<String> getAttributeNames()
Return attribute names.- Returns:
- attribute names.
-
getDescription
public String getDescription()
Returns description.- Returns:
- description.
-
setDescription
public void setDescription(String description)
Set description.- Parameters:
description- description.
-
getCreationDate
public long getCreationDate()
Returns creation date.- Returns:
- creation date.
-
setCreationDate
public void setCreationDate(long creationDate)
Sets the creation date.- Parameters:
creationDate- creation date.
-
getLastModifiedDate
public long getLastModifiedDate()
Returns last modified date.- Returns:
- last modified date.
-
setLastModifiedDate
public void setLastModifiedDate(long lastModifiedDate)
Sets the last modified date.- Parameters:
lastModifiedDate- last modified date.
-
getLastModifiedBy
public String getLastModifiedBy()
Returns the user ID who last modified the policy.- Returns:
- user ID who last modified the policy.
-
setLastModifiedBy
public void setLastModifiedBy(String lastModifiedBy)
Sets the user ID who last modified the policy.- Parameters:
lastModifiedBy- user ID who last modified the policy.
-
getCreatedBy
public String getCreatedBy()
Returns the user ID who created the policy.- Returns:
- user ID who created the policy.
-
setCreatedBy
public void setCreatedBy(String createdBy)
Sets the user ID who created the policy.- Parameters:
createdBy- user ID who created the policy.
-
setName
public void setName(String name)
-
setDisplayName
public void setDisplayName(String displayName)
Sets the application display name.- Parameters:
displayName- The application display name.
-
canBeDeleted
public boolean canBeDeleted(String realm)
-
isEditable
public boolean isEditable()
An Application is editable if it can be changed by an end user. This method was put in place for subclasses that can not be edited.- Returns:
- True if the Application can be edited.
-
-