Package com.sun.identity.entitlement
Class Application
- java.lang.Object
-
- com.sun.identity.entitlement.Application
-
-
Field Summary
Fields Modifier and Type Field Description static String
CREATED_BY_ATTRIBUTE
Created by index keystatic String
CREATION_DATE_ATTRIBUTE
Creation date index keystatic String
DESCRIPTION_ATTRIBUTE
Description attribute name,static String
LAST_MODIFIED_BY_ATTRIBUTE
Last modified by index keystatic String
LAST_MODIFIED_DATE_ATTRIBUTE
Last modified date index keystatic String
NAME_ATTRIBUTE
Name 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 void
addAllResourceTypeUuids(Set<String> resourceTypeUuids)
Adds the passed set of resource type UUIDs to the application.void
addAttributeNames(Set<String> names)
Adds attribute names.void
addResourceTypeUuid(String resourceTypeUuid)
Adds the passed resource type UUID to the application.boolean
canBeDeleted(String realm)
Application
clone()
protected void
cloneAppl(Application clone)
ApplicationType
getApplicationType()
Returns application type.Set<String>
getAttributeNames()
Return attribute names.Set<String>
getConditions()
Returns set of supported condition class names.String
getCreatedBy()
Returns the user ID who created the policy.long
getCreationDate()
Returns creation date.String
getDescription()
Returns description.String
getDisplayName()
Returns application display name.EntitlementCombiner
getEntitlementCombiner()
Returns a new instance of entitlement combiner.Class
getEntitlementCombinerClass()
Returns entitlement combiner class.String
getLastModifiedBy()
Returns the user ID who last modified the policy.long
getLastModifiedDate()
Returns last modified date.Set<String>
getMetaData()
Returns meta information.String
getName()
Returns application name.ResourceName
getResourceComparator()
Returns resource comparator for this Application, defaulting to the ApplicationType's resource comparator if none is directly associated with this Application.ResourceName
getResourceComparator(boolean defaultToAppType)
Returns resource comparator for this Application.Class
getResourceComparatorClass()
Returns resource comparator class.ResourceSaveIndexes
getResourceSaveIndex(String resource)
Returns save indexes for a given resource.ResourceSearchIndexes
getResourceSearchIndex(String resource, String realm)
Returns search indexes for a given resource.Set<String>
getResourceTypeUuids()
Retrieves the resource type UUIDs associated with the application.ISaveIndex
getSaveIndex()
Returns save indexClass
getSaveIndexClass()
Returns save index class.ISearchIndex
getSearchIndex()
Returns search indexClass
getSearchIndexClass()
Returns search index class.Set<String>
getSubjects()
Returns set of supported subject class names.boolean
isEditable()
An Application is editable if it can be changed by an end user.void
removeResourceTypeUuid(String resourceTypeUuid)
Removes the passed resource type UUID from the application.void
setApplicationType(ApplicationType applicationType)
Sets the application type of this Applicationvoid
setAttributeNames(Set<String> names)
Sets attribute names.void
setConditions(Set<String> conditions)
Sets supported condition class names.void
setCreatedBy(String createdBy)
Sets the user ID who created the policy.void
setCreationDate(long creationDate)
Sets the creation date.void
setDescription(String description)
Set description.void
setDisplayName(String displayName)
Sets the application display name.void
setEntitlementCombiner(Class entitlementCombiner)
Sets entitlement combiner.void
setEntitlementCombinerName(Class<? extends EntitlementCombiner> entitlementCombiner)
Sets entitlement combiner using theEntitlementRegistry
to look up the appropriate class.void
setLastModifiedBy(String lastModifiedBy)
Sets the user ID who last modified the policy.void
setLastModifiedDate(long lastModifiedDate)
Sets the last modified date.void
setMetaData(Set<String> meta)
void
setName(String name)
void
setResourceComparator(Class resourceComparator)
Sets resource comparator.void
setSaveIndex(Class saveIndex)
Sets save index.void
setSearchIndex(Class searchIndex)
Sets search index generator.void
setSubjects(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:
InstantiationException
IllegalAccessException
-
setSearchIndex
public void setSearchIndex(Class searchIndex) throws InstantiationException, IllegalAccessException
Sets search index generator.- Parameters:
searchIndex
- search index generator.- Throws:
InstantiationException
IllegalAccessException
-
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 theEntitlementRegistry
to 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:
InstantiationException
IllegalAccessException
-
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.
-
-