|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.model.InternalEntity
com.atlassian.crowd.model.application.ApplicationImpl
public class ApplicationImpl
Implementation of Application (designed for use for Hibernate).
| Field Summary |
|---|
| Fields inherited from class com.atlassian.crowd.model.InternalEntity |
|---|
active, createdDate, id, name, updatedDate |
| Constructor Summary | |
|---|---|
protected |
ApplicationImpl()
|
|
ApplicationImpl(InternalEntityTemplate template)
Used for importing via XML migration. |
protected |
ApplicationImpl(java.lang.String name,
long id,
ApplicationType type,
java.lang.String description,
PasswordCredential credential,
boolean active,
java.util.Map<java.lang.String,java.lang.String> attributes,
java.util.List<DirectoryMapping> directoryMappings,
java.util.Set<RemoteAddress> remoteAddresses,
java.util.Date createdDate,
java.util.Date updatedDate)
|
| Method Summary | |
|---|---|
void |
addDirectoryMapping(Directory directory,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
|
void |
addGroupMapping(long directoryId,
java.lang.String groupName)
|
void |
addRemoteAddress(java.lang.String remoteAddress)
|
boolean |
equals(java.lang.Object o)
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns the attributes of the application. |
PasswordCredential |
getCredential()
Returns the application password. |
java.lang.String |
getDescription()
Returns the description of the application. |
DirectoryMapping |
getDirectoryMapping(long directoryId)
Returns a directory mapping of the directory specified by directory id. |
java.util.List<DirectoryMapping> |
getDirectoryMappings()
Returns the list of directory mappings ranked by directory priority as in perspective of the application. |
java.util.Set<java.lang.String> |
getKeys()
Gets all the keys of the attributes. |
java.lang.String |
getLowerName()
|
java.util.Set<RemoteAddress> |
getRemoteAddresses()
Returns the whitelist of addresses allowed to connect to Crowd as the application. |
ApplicationType |
getType()
Returns the type of the application. |
java.lang.String |
getValue(java.lang.String name)
Returns any value associated with the given key, returns null if there is no value. |
java.util.Set<java.lang.String> |
getValues(java.lang.String name)
Get all the values associated with a given key. |
int |
hashCode()
|
boolean |
hasRemoteAddress(java.lang.String remoteAddress)
Returns true if the remote address is already in the list of allowable remote addresses for the application. |
boolean |
isAliasingEnabled()
Returns true if aliasing is enabled for the application. |
boolean |
isEmpty()
|
boolean |
isLowerCaseOutput()
Returns true if the usernames and group names returned should be in lowercase. |
boolean |
isPermanent()
Returns whether the application is a permanent application and thus cannot be removed. |
static ApplicationImpl |
newInstance(Application application)
|
static ApplicationImpl |
newInstance(java.lang.String name,
ApplicationType type)
|
static ApplicationImpl |
newInstanceWithCredential(java.lang.String name,
ApplicationType type,
PasswordCredential credential)
|
static ApplicationImpl |
newInstanceWithIdAndCredential(java.lang.String name,
ApplicationType type,
PasswordCredential credential,
long id)
|
static ApplicationImpl |
newInstanceWithPassword(java.lang.String name,
ApplicationType type,
java.lang.String password)
|
void |
removeAttribute(java.lang.String name)
|
boolean |
removeDirectoryMapping(long directoryId)
|
boolean |
removeRemoteAddress(java.lang.String remoteAddress)
|
void |
setActive(boolean active)
|
void |
setAliasingEnabled(boolean aliasingEnabled)
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the attributes of the application. |
void |
setCredential(PasswordCredential credential)
|
void |
setDescription(java.lang.String description)
|
void |
setLowerCaseOutput(boolean value)
|
void |
setName(java.lang.String name)
|
void |
setRemoteAddresses(java.util.Set<RemoteAddress> remoteAddresses)
|
void |
setType(ApplicationType type)
|
java.lang.String |
toString()
|
void |
updateAttributesFrom(java.util.Map<java.lang.String,java.lang.String> attributes)
|
void |
updateDetailsFromApplication(Application application)
Only to be used by the ApplicationDAO#update method |
void |
validate()
|
| Methods inherited from class com.atlassian.crowd.model.InternalEntity |
|---|
getCreatedDate, getId, getName, getUpdatedDate, isActive, setCreatedDate, setCreatedDateToNow, setUpdatedDate, setUpdatedDateToNow |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.atlassian.crowd.model.application.Application |
|---|
getCreatedDate, getId, getName, getUpdatedDate, isActive |
| Constructor Detail |
|---|
protected ApplicationImpl()
protected ApplicationImpl(java.lang.String name,
long id,
ApplicationType type,
java.lang.String description,
PasswordCredential credential,
boolean active,
java.util.Map<java.lang.String,java.lang.String> attributes,
java.util.List<DirectoryMapping> directoryMappings,
java.util.Set<RemoteAddress> remoteAddresses,
java.util.Date createdDate,
java.util.Date updatedDate)
public ApplicationImpl(InternalEntityTemplate template)
template - directory template.| Method Detail |
|---|
public static ApplicationImpl newInstance(Application application)
public static ApplicationImpl newInstance(java.lang.String name,
ApplicationType type)
public static ApplicationImpl newInstanceWithIdAndCredential(java.lang.String name,
ApplicationType type,
PasswordCredential credential,
long id)
public static ApplicationImpl newInstanceWithCredential(java.lang.String name,
ApplicationType type,
PasswordCredential credential)
public static ApplicationImpl newInstanceWithPassword(java.lang.String name,
ApplicationType type,
java.lang.String password)
public void updateDetailsFromApplication(Application application)
application - public void updateAttributesFrom(java.util.Map<java.lang.String,java.lang.String> attributes)
public void validate()
public void setName(java.lang.String name)
setName in class InternalEntitypublic void setActive(boolean active)
setActive in class InternalEntitypublic java.lang.String getLowerName()
public ApplicationType getType()
Application
getType in interface Applicationpublic void setType(ApplicationType type)
public java.lang.String getDescription()
Application
getDescription in interface Applicationpublic void setDescription(java.lang.String description)
public PasswordCredential getCredential()
Application
getCredential in interface Applicationpublic void setCredential(PasswordCredential credential)
public boolean isPermanent()
Application
isPermanent in interface Applicationpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
Application
getAttributes in interface Applicationpublic void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes must be a mutable Map.
attributes - new attributespublic java.util.List<DirectoryMapping> getDirectoryMappings()
Application
getDirectoryMappings in interface Application
public void addDirectoryMapping(Directory directory,
boolean allowAllToAuthenticate,
OperationType... operationTypes)
public void addGroupMapping(long directoryId,
java.lang.String groupName)
public DirectoryMapping getDirectoryMapping(long directoryId)
Application
getDirectoryMapping in interface ApplicationdirectoryId - ID of the directory
public boolean removeDirectoryMapping(long directoryId)
public java.util.Set<RemoteAddress> getRemoteAddresses()
Application
getRemoteAddresses in interface Applicationpublic void addRemoteAddress(java.lang.String remoteAddress)
public void setRemoteAddresses(java.util.Set<RemoteAddress> remoteAddresses)
public boolean hasRemoteAddress(java.lang.String remoteAddress)
Application
hasRemoteAddress in interface ApplicationremoteAddress - RemoteAddress whose presence is to be tested
public boolean removeRemoteAddress(java.lang.String remoteAddress)
public java.util.Set<java.lang.String> getValues(java.lang.String name)
Attributes
getValues in interface Attributesname - attribute name.
null
if the directory does not have the attribute.public java.lang.String getValue(java.lang.String name)
Attributesnull if there is no value.
getValue in interface Attributesname - the key to retrieve the value for
null if there is no valuepublic java.util.Set<java.lang.String> getKeys()
Attributes
getKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributestrue if there are no attributes
public void setAttribute(java.lang.String name,
java.lang.String value)
public void removeAttribute(java.lang.String name)
public boolean isLowerCaseOutput()
Application
isLowerCaseOutput in interface Applicationpublic void setLowerCaseOutput(boolean value)
public void setAliasingEnabled(boolean aliasingEnabled)
public boolean isAliasingEnabled()
Application
isAliasingEnabled in interface Applicationpublic boolean equals(java.lang.Object o)
equals in class InternalEntitypublic int hashCode()
hashCode in class InternalEntitypublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||