com.atlassian.crowd.model.application
Class ApplicationImpl
java.lang.Object
com.atlassian.crowd.model.InternalEntity
com.atlassian.crowd.model.application.ApplicationImpl
- All Implemented Interfaces:
- com.atlassian.crowd.embedded.api.Attributes, Application, TimestampedEntity, Serializable
public class ApplicationImpl
- extends InternalEntity
- implements Application
Implementation of Application (designed for use for Hibernate).
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
ApplicationImpl()
|
|
ApplicationImpl(InternalEntityTemplate template)
Used for importing via XML migration. |
protected |
ApplicationImpl(String name,
long id,
ApplicationType type,
String description,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
boolean active,
Map<String,String> attributes,
List<DirectoryMapping> directoryMappings,
Set<RemoteAddress> remoteAddresses,
Set<Webhook> webhooks,
Date createdDate,
Date updatedDate)
|
|
Method Summary |
void |
addDirectoryMapping(com.atlassian.crowd.embedded.api.Directory directory,
boolean allowAllToAuthenticate,
com.atlassian.crowd.embedded.api.OperationType... operationTypes)
|
void |
addGroupMapping(long directoryId,
String groupName)
|
void |
addRemoteAddress(String remoteAddress)
|
boolean |
equals(Object o)
|
Map<String,String> |
getAttributes()
|
com.atlassian.crowd.embedded.api.PasswordCredential |
getCredential()
|
String |
getDescription()
|
DirectoryMapping |
getDirectoryMapping(long directoryId)
|
List<DirectoryMapping> |
getDirectoryMappings()
|
Set<String> |
getKeys()
|
String |
getLowerName()
|
Set<RemoteAddress> |
getRemoteAddresses()
|
ApplicationType |
getType()
|
String |
getValue(String name)
|
Set<String> |
getValues(String name)
|
Set<Webhook> |
getWebhooks()
|
int |
hashCode()
|
boolean |
hasRemoteAddress(String remoteAddress)
|
boolean |
isAliasingEnabled()
|
boolean |
isEmpty()
|
boolean |
isLowerCaseOutput()
|
boolean |
isPermanent()
|
static ApplicationImpl |
newInstance(Application application)
|
static ApplicationImpl |
newInstance(String name,
ApplicationType type)
|
static ApplicationImpl |
newInstanceWithCredential(String name,
ApplicationType type,
com.atlassian.crowd.embedded.api.PasswordCredential credential)
|
static ApplicationImpl |
newInstanceWithIdAndCredential(String name,
ApplicationType type,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
long id)
|
static ApplicationImpl |
newInstanceWithPassword(String name,
ApplicationType type,
String password)
|
void |
removeAttribute(String name)
|
boolean |
removeDirectoryMapping(long directoryId)
|
boolean |
removeRemoteAddress(String remoteAddress)
|
void |
setActive(boolean active)
|
void |
setAliasingEnabled(boolean aliasingEnabled)
|
void |
setAttribute(String name,
String value)
|
void |
setAttributes(Map<String,String> attributes)
Sets the attributes of the application. |
void |
setCredential(com.atlassian.crowd.embedded.api.PasswordCredential credential)
|
void |
setDescription(String description)
|
void |
setLowerCaseOutput(boolean value)
|
void |
setName(String name)
|
void |
setRemoteAddresses(Set<RemoteAddress> remoteAddresses)
|
void |
setType(ApplicationType type)
|
void |
setWebhooks(Set<Webhook> webhooks)
This setter should only be called by hibernate and must replace the collection instance; compare with
updateDetailsFromApplication(Application). |
String |
toString()
|
void |
updateAttributesFrom(Map<String,String> attributes)
|
void |
updateDetailsFromApplication(Application application)
Only to be used by the ApplicationDAO#update method |
void |
validate()
|
ApplicationImpl
protected ApplicationImpl()
ApplicationImpl
protected ApplicationImpl(String name,
long id,
ApplicationType type,
String description,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
boolean active,
Map<String,String> attributes,
List<DirectoryMapping> directoryMappings,
Set<RemoteAddress> remoteAddresses,
Set<Webhook> webhooks,
Date createdDate,
Date updatedDate)
ApplicationImpl
public ApplicationImpl(InternalEntityTemplate template)
- Used for importing via XML migration.
- Parameters:
template - directory template.
newInstance
public static ApplicationImpl newInstance(Application application)
newInstance
public static ApplicationImpl newInstance(String name,
ApplicationType type)
newInstanceWithIdAndCredential
public static ApplicationImpl newInstanceWithIdAndCredential(String name,
ApplicationType type,
com.atlassian.crowd.embedded.api.PasswordCredential credential,
long id)
newInstanceWithCredential
public static ApplicationImpl newInstanceWithCredential(String name,
ApplicationType type,
com.atlassian.crowd.embedded.api.PasswordCredential credential)
newInstanceWithPassword
public static ApplicationImpl newInstanceWithPassword(String name,
ApplicationType type,
String password)
updateDetailsFromApplication
public void updateDetailsFromApplication(Application application)
- Only to be used by the ApplicationDAO#update method
- Parameters:
application -
updateAttributesFrom
public void updateAttributesFrom(Map<String,String> attributes)
validate
public void validate()
setName
public void setName(String name)
- Overrides:
setName in class InternalEntity
setActive
public void setActive(boolean active)
- Overrides:
setActive in class InternalEntity
getLowerName
public String getLowerName()
getType
public ApplicationType getType()
- Specified by:
getType in interface Application
setType
public void setType(ApplicationType type)
getDescription
public String getDescription()
- Specified by:
getDescription in interface Application
setDescription
public void setDescription(String description)
getCredential
public com.atlassian.crowd.embedded.api.PasswordCredential getCredential()
- Specified by:
getCredential in interface Application
setCredential
public void setCredential(com.atlassian.crowd.embedded.api.PasswordCredential credential)
isPermanent
public boolean isPermanent()
- Specified by:
isPermanent in interface Application
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributes in interface Application
setAttributes
public void setAttributes(Map<String,String> attributes)
- Sets the attributes of the application.
attributes must be a mutable Map.
- Parameters:
attributes - new attributes
getDirectoryMappings
public List<DirectoryMapping> getDirectoryMappings()
- Specified by:
getDirectoryMappings in interface Application
addDirectoryMapping
public void addDirectoryMapping(com.atlassian.crowd.embedded.api.Directory directory,
boolean allowAllToAuthenticate,
com.atlassian.crowd.embedded.api.OperationType... operationTypes)
addGroupMapping
public void addGroupMapping(long directoryId,
String groupName)
getDirectoryMapping
public DirectoryMapping getDirectoryMapping(long directoryId)
- Specified by:
getDirectoryMapping in interface Application
removeDirectoryMapping
public boolean removeDirectoryMapping(long directoryId)
getRemoteAddresses
public Set<RemoteAddress> getRemoteAddresses()
- Specified by:
getRemoteAddresses in interface Application
addRemoteAddress
public void addRemoteAddress(String remoteAddress)
setRemoteAddresses
public void setRemoteAddresses(Set<RemoteAddress> remoteAddresses)
hasRemoteAddress
public boolean hasRemoteAddress(String remoteAddress)
- Specified by:
hasRemoteAddress in interface Application
removeRemoteAddress
public boolean removeRemoteAddress(String remoteAddress)
getWebhooks
public Set<Webhook> getWebhooks()
- Specified by:
getWebhooks in interface Application
setWebhooks
public void setWebhooks(Set<Webhook> webhooks)
- This setter should only be called by hibernate and must replace the collection instance; compare with
updateDetailsFromApplication(Application).
- Parameters:
webhooks - new Set of webhooks
getValues
public Set<String> getValues(String name)
- Specified by:
getValues in interface com.atlassian.crowd.embedded.api.Attributes
- Parameters:
name - attribute name.
- Returns:
- a collection of the only attribtue value or
null
if the directory does not have the attribute.
getValue
public String getValue(String name)
- Specified by:
getValue in interface com.atlassian.crowd.embedded.api.Attributes
getKeys
public Set<String> getKeys()
- Specified by:
getKeys in interface com.atlassian.crowd.embedded.api.Attributes
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface com.atlassian.crowd.embedded.api.Attributes
setAttribute
public void setAttribute(String name,
String value)
removeAttribute
public void removeAttribute(String name)
isLowerCaseOutput
public boolean isLowerCaseOutput()
- Specified by:
isLowerCaseOutput in interface Application
setLowerCaseOutput
public void setLowerCaseOutput(boolean value)
setAliasingEnabled
public void setAliasingEnabled(boolean aliasingEnabled)
isAliasingEnabled
public boolean isAliasingEnabled()
- Specified by:
isAliasingEnabled in interface Application
equals
public boolean equals(Object o)
- Specified by:
equals in class InternalEntity
hashCode
public int hashCode()
- Specified by:
hashCode in class InternalEntity
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014 Atlassian. All Rights Reserved.