Class ImmutableApplication
java.lang.Object
com.atlassian.crowd.model.application.ImmutableApplication
- All Implemented Interfaces:
Attributes
,Application
,Serializable
Immutable Application
- Since:
- 2.2
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionImmutableApplication
(Long id, String name, ApplicationType type, String description, PasswordCredential passwordCredential, boolean permanent, boolean active, Map<String, String> attributes, List<DirectoryMapping> directoryMappings, Set<RemoteAddress> remoteAddresses, Set<Webhook> webhooks, boolean lowercaseOutput, boolean aliasingEnabled, Date createdDate, Date updatedDate) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableApplication.Builder
builder
(Application application) Constructs a new builder for anImmutableApplication
with the fields initialised toapplication
.static ImmutableApplication.Builder
builder
(String name, ApplicationType type) Constructs a new builder for anImmutableApplication
.boolean
static ImmutableApplication
from
(Application application) getApplicationDirectoryMapping
(long directoryId) Returns a directory mapping of the directory specified by directory id.Returns the list of directory mappings ranked by directory priority as in perspective of the application.Returns the attributes of the application.Returns the date the application was created.Returns the application password.Returns the description of the application.getDirectoryMapping
(long directoryId) Returns a directory mapping of the directory specified by directory id.Returns the list of directory mappings ranked by directory priority as in perspective of the application.getId()
Returns the application ID.getKeys()
Gets all the keys of the attributes.getName()
Returns the name of the application.Returns the whitelist of addresses allowed to connect to Crowd as the application.getType()
Returns the type of the application.Returns the date the application was last updated.Returns any value associated with the given key, returnsnull
if there is no value.Get all the values associated with a given key.Returns the Webhooks associated to the application.int
hashCode()
boolean
hasRemoteAddress
(String remoteAddress) Returnstrue
if the remote address is already in the list of allowable remote addresses for the application.boolean
isActive()
Returns whether the application is active.boolean
Returnstrue
if aliasing is enabled for the application.boolean
Determines whether application can authenticate their users using their e-mail.boolean
Returnstrue
if application has authentication without user's password enabled, false otherwise.boolean
boolean
isEmpty()
boolean
boolean
boolean
Returnstrue
if the usernames and group names returned should be in lowercase.boolean
boolean
Returns whether the application is a permanent application and thus cannot be removed.toString()
-
Constructor Details
-
ImmutableApplication
@Deprecated public ImmutableApplication(Long id, String name, ApplicationType type, String description, PasswordCredential passwordCredential, boolean permanent, boolean active, Map<String, String> attributes, List<DirectoryMapping> directoryMappings, Set<RemoteAddress> remoteAddresses, Set<Webhook> webhooks, boolean lowercaseOutput, boolean aliasingEnabled, Date createdDate, Date updatedDate) Deprecated.UseImmutableApplication.Builder
instead.
-
-
Method Details
-
getId
Description copied from interface:Application
Returns the application ID.- Specified by:
getId
in interfaceApplication
- Returns:
- application ID
-
getName
Description copied from interface:Application
Returns the name of the application.- Specified by:
getName
in interfaceApplication
- Returns:
- name of the application
-
getType
Description copied from interface:Application
Returns the type of the application.- Specified by:
getType
in interfaceApplication
- Returns:
- application type
-
getDescription
Description copied from interface:Application
Returns the description of the application.- Specified by:
getDescription
in interfaceApplication
- Returns:
- description of the application
-
getCredential
Description copied from interface:Application
Returns the application password.- Specified by:
getCredential
in interfaceApplication
- Returns:
- application password
-
isPermanent
public boolean isPermanent()Description copied from interface:Application
Returns whether the application is a permanent application and thus cannot be removed. For instance, the Crowd application is a permanent application.- Specified by:
isPermanent
in interfaceApplication
- Returns:
true
if the application is permanent.
-
isActive
public boolean isActive()Description copied from interface:Application
Returns whether the application is active.- Specified by:
isActive
in interfaceApplication
- Returns:
true
if the application is active.
-
getAttributes
Description copied from interface:Application
Returns the attributes of the application.- Specified by:
getAttributes
in interfaceApplication
- Returns:
- attributes of the application
-
getDirectoryMappings
Description copied from interface:Application
Returns the list of directory mappings ranked by directory priority as in perspective of the application.- Specified by:
getDirectoryMappings
in interfaceApplication
- Returns:
- List of directory mappings (never null).
-
getApplicationDirectoryMappings
Description copied from interface:Application
Returns the list of directory mappings ranked by directory priority as in perspective of the application.- Specified by:
getApplicationDirectoryMappings
in interfaceApplication
- Returns:
- List of directory mappings (never null).
-
getDirectoryMapping
Description copied from interface:Application
Returns a directory mapping of the directory specified by directory id.- Specified by:
getDirectoryMapping
in interfaceApplication
- Parameters:
directoryId
- ID of the directory- Returns:
- directory mapping if found, null if the directory mapping could not be found
-
getApplicationDirectoryMapping
Description copied from interface:Application
Returns a directory mapping of the directory specified by directory id.- Specified by:
getApplicationDirectoryMapping
in interfaceApplication
- Parameters:
directoryId
- ID of the directory- Returns:
- directory mapping if found, null if the directory mapping could not be found
-
getRemoteAddresses
Description copied from interface:Application
Returns the whitelist of addresses allowed to connect to Crowd as the application. The remote addresses may contain subnet masking information in CIDR format.- Specified by:
getRemoteAddresses
in interfaceApplication
- Returns:
- whitelist of addresses allowed to connect to Crowd as the application.
-
hasRemoteAddress
Description copied from interface:Application
Returnstrue
if the remote address is already in the list of allowable remote addresses for the application.- Specified by:
hasRemoteAddress
in interfaceApplication
- Parameters:
remoteAddress
- RemoteAddress whose presence is to be tested- Returns:
true
if the remote address is already in the list of allowable remote addresses for the application
-
getWebhooks
Description copied from interface:Application
Returns the Webhooks associated to the application. Webhooks were added in Crowd 2.7. For applications that are not Crowd servers, it is OK to always return an empty Set.- Specified by:
getWebhooks
in interfaceApplication
- Returns:
- Webhooks associated to the application.
-
isLowerCaseOutput
public boolean isLowerCaseOutput()Description copied from interface:Application
Returnstrue
if the usernames and group names returned should be in lowercase.- Specified by:
isLowerCaseOutput
in interfaceApplication
- Returns:
true
if the usernames and group names returned
-
isAliasingEnabled
public boolean isAliasingEnabled()Description copied from interface:Application
Returnstrue
if aliasing is enabled for the application.- Specified by:
isAliasingEnabled
in interfaceApplication
- Returns:
true
if aliasing is enabled for the application
-
isFilteringUsersWithAccessEnabled
public boolean isFilteringUsersWithAccessEnabled()- Specified by:
isFilteringUsersWithAccessEnabled
in interfaceApplication
- Returns:
true
if user queries should return only users with access.
-
isFilteringGroupsWithAccessEnabled
public boolean isFilteringGroupsWithAccessEnabled()- Specified by:
isFilteringGroupsWithAccessEnabled
in interfaceApplication
- Returns:
true
if group queries should return only groups with access.
-
isMembershipAggregationEnabled
public boolean isMembershipAggregationEnabled()- Specified by:
isMembershipAggregationEnabled
in interfaceApplication
- Returns:
true
if membership aggregation is enabled for this application.
-
isCachedDirectoriesAuthenticationOrderOptimisationEnabled
public boolean isCachedDirectoriesAuthenticationOrderOptimisationEnabled()- Specified by:
isCachedDirectoriesAuthenticationOrderOptimisationEnabled
in interfaceApplication
- Returns:
true
if authentication order optimization for cached directories is enabled for this application.
-
isAuthenticationWithoutPasswordEnabled
public boolean isAuthenticationWithoutPasswordEnabled()Description copied from interface:Application
Returnstrue
if application has authentication without user's password enabled, false otherwise.Authentication without user's password is used i.e. for remember me functionality in Atlassian products. If a user session is expired but remember-me cookie is still valid, product will request Crowd to generate a new Crowd SSO token without passing user's password to Crowd.
As possibility to authenticate user without knowing their password is considered insecure, this option is disabled by default and it should be enabled only for trusted apps.
- Specified by:
isAuthenticationWithoutPasswordEnabled
in interfaceApplication
- Returns:
true
if application has authentication without user's password enabled, false otherwise.
-
isAuthenticationViaEmailEnabled
public boolean isAuthenticationViaEmailEnabled()Description copied from interface:Application
Determines whether application can authenticate their users using their e-mail.- Specified by:
isAuthenticationViaEmailEnabled
in interfaceApplication
- Returns:
- true if application has authentication via email enabled, false otherwise.
-
getCreatedDate
Description copied from interface:Application
Returns the date the application was created.- Specified by:
getCreatedDate
in interfaceApplication
- Returns:
- date the application was created
-
getUpdatedDate
Description copied from interface:Application
Returns the date the application was last updated. If the application has just been created, the updated date will be the same as the creation date.- Specified by:
getUpdatedDate
in interfaceApplication
- Returns:
- date the application was last updated
-
getValues
Description copied from interface:Attributes
Get all the values associated with a given key. Duplicate values are not allowed, and this should be enforced case-insensitively to match the behaviour of LDAP servers. Will return null if the key does not exist.- Specified by:
getValues
in interfaceAttributes
- Parameters:
key
- the key to retrieve the values for- Returns:
- the values associated with the given key. It may return null or empty set if the key does not exist.
-
getValue
Description copied from interface:Attributes
Returns any value associated with the given key, returnsnull
if there is no value.- Specified by:
getValue
in interfaceAttributes
- Parameters:
key
- the key to retrieve the value for- Returns:
- any value associated with the given key, or
null
if there is no value
-
getKeys
Description copied from interface:Attributes
Gets all the keys of the attributes. Warning: case-insensitive keys are currently no enforced, however this is the case for LDAP, so this may be implemented in the future.- Specified by:
getKeys
in interfaceAttributes
- Returns:
- a set of all the keys.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceAttributes
- Returns:
true
if there are no attributes
-
builder
Constructs a new builder for anImmutableApplication
.- Parameters:
name
- name of the applicationtype
- type of the application- Returns:
- builder with the name and type initialised
-
builder
Constructs a new builder for anImmutableApplication
with the fields initialised toapplication
.- Parameters:
application
- application to duplicate- Returns:
- builder with the fields initialised to
application
-
from
- Returns:
- an
ImmutableApplication
with the same properties as the given application. Will avoid creating a copy if possible.
-
equals
-
hashCode
public int hashCode() -
toString
-
ImmutableApplication.Builder
instead.