|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.plugin.rest.util.ApplicationEntityTranslator
public class ApplicationEntityTranslator
Translates between application related REST entities and com.atlassian.crowd.model classes.
| Nested Class Summary | |
|---|---|
static class |
ApplicationEntityTranslator.PasswordMode
|
| Method Summary | |
|---|---|
static java.lang.Boolean |
getBoolean(java.lang.Boolean b)
Returns the boolean if not null, otherwise returns false. |
static ApplicationEntityList |
toApplicationEntities(java.util.Collection<Application> applications,
java.net.URI baseUri)
Translates from a collection of Applications to a list of ApplicationEntitys. |
static ApplicationEntity |
toApplicationEntity(Application application,
com.atlassian.plugins.rest.common.Link link)
Translates from an Application to an ApplicationEntity. |
static ApplicationEntity |
toApplicationEntity(Application application,
com.atlassian.plugins.rest.common.Link link,
ApplicationEntityTranslator.PasswordMode passwordMode)
Translates from an Application to an ApplicationEntity. |
static ApplicationType |
toApplicationType(java.lang.String type)
Translates from an application type string to an ApplicationType. |
static Application |
toApplicationWithNoDirectoryMappings(ApplicationEntity applicationEntity)
Translates from an ApplicationEntity to an Application with no directory mappings. |
static AttributeEntityList |
toAttributeEntities(java.util.Map<java.lang.String,java.lang.String> attributes)
Translates attributes to AttributeEntityList. |
static DirectoryMapping |
toDirectoryMapping(DirectoryMappingEntity directoryMappingEntity,
Application application,
Directory directory)
Translates from a DirectoryMappingEntity to a DirectoryMapping. |
static DirectoryMappingEntityList |
toDirectoryMappingEntities(java.util.List<DirectoryMapping> directoryMappings,
java.net.URI applicationUri)
Translates from a list of DirectoryMapping to a DirectoryMappingEntityList. |
static DirectoryMappingEntity |
toDirectoryMappingEntity(DirectoryMapping directoryMapping,
java.net.URI directoryMappingsUri)
Translates from a DirectoryMapping to a DirectoryMappingEntity. |
static java.util.List<DirectoryMapping> |
toDirectoryMappings(DirectoryMappingEntityList directoryMappingEntities,
Application application,
DirectoryManager directoryManager)
Translates from a DirectoryMappingEntityList to a list of DirectoryMapping. |
static OperationType |
toOperationType(java.lang.String type)
Translates from an operation type string to an OperationType. |
static java.util.Set<OperationType> |
toOperationTypes(java.util.Set<java.lang.String> types)
Translates from a set of operation type strings to a set of OperationType. |
static java.lang.String |
toOperationTypeString(OperationType type)
Translates from an OperationType to an operation type string. |
static java.util.Set<java.lang.String> |
toOperationTypeStrings(java.util.Set<OperationType> types)
Translates from a set of OperationTypes to a set of operation type strings. |
static PasswordCredential |
toPasswordCredential(PasswordEntity passwordEntity)
Translates from a PasswordEntity to a PasswordCredential. |
static RemoteAddress |
toRemoteAddress(RemoteAddressEntity remoteAddressEntity)
Translates from a RemoteAddressEntity to a RemoteAddress. |
static RemoteAddressEntitySet |
toRemoteAddressEntities(java.util.Set<RemoteAddress> remoteAddresses,
java.net.URI baseUri)
Translate from a set of RemoteAddresses to RemoteAddressEntitySet. |
static RemoteAddressEntity |
toRemoteAddressEntity(RemoteAddress remoteAddress,
java.net.URI baseUri)
Translate from a RemoteAddress to a RemoteAddressEntity. |
static java.util.Set<RemoteAddress> |
toRemoteAddresses(RemoteAddressEntitySet remoteAddressEntities)
Translates from a RemoteAddressEntitySet to a set of RemoteAddress. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Application toApplicationWithNoDirectoryMappings(ApplicationEntity applicationEntity)
applicationEntity - ApplicationEntity to convert
public static ApplicationEntity toApplicationEntity(Application application,
com.atlassian.plugins.rest.common.Link link)
application - Application to convertlink - Link to the Application
public static ApplicationEntity toApplicationEntity(Application application,
com.atlassian.plugins.rest.common.Link link,
ApplicationEntityTranslator.PasswordMode passwordMode)
application - Application to convertlink - Link to the ApplicationpasswordMode - whether to include the password in the application entity
public static PasswordCredential toPasswordCredential(PasswordEntity passwordEntity)
PasswordEntity to a PasswordCredential.
passwordEntity - password entity to translate
public static java.util.List<DirectoryMapping> toDirectoryMappings(DirectoryMappingEntityList directoryMappingEntities,
Application application,
DirectoryManager directoryManager)
throws DirectoryNotFoundException
DirectoryMappingEntityList to a list of DirectoryMapping.
directoryMappingEntities - list of directory mapping entitiesapplication - the application being mappeddirectoryManager - the DirectoryManager
DirectoryNotFoundException - if the directory being mapped could not be found
public static DirectoryMapping toDirectoryMapping(DirectoryMappingEntity directoryMappingEntity,
Application application,
Directory directory)
DirectoryMappingEntity to a DirectoryMapping.
directoryMappingEntity - directory mapping entityapplication - the application to mapdirectory - the directory to map
public static DirectoryMappingEntityList toDirectoryMappingEntities(java.util.List<DirectoryMapping> directoryMappings,
java.net.URI applicationUri)
DirectoryMapping to a DirectoryMappingEntityList.
directoryMappings - list of directory mappingsapplicationUri - URI for the application resource
public static DirectoryMappingEntity toDirectoryMappingEntity(DirectoryMapping directoryMapping,
java.net.URI directoryMappingsUri)
DirectoryMapping to a DirectoryMappingEntity.
directoryMapping - directory mappingdirectoryMappingsUri - URI to the application directory mappings resource
public static java.util.Set<RemoteAddress> toRemoteAddresses(RemoteAddressEntitySet remoteAddressEntities)
RemoteAddressEntitySet to a set of RemoteAddress.
remoteAddressEntities - set of remote address entities
public static ApplicationEntityList toApplicationEntities(java.util.Collection<Application> applications,
java.net.URI baseUri)
Applications to a list of ApplicationEntitys.
applications - collection of applications to translatebaseUri - base URI of the REST service
public static RemoteAddress toRemoteAddress(RemoteAddressEntity remoteAddressEntity)
RemoteAddressEntity to a RemoteAddress.
remoteAddressEntity - remote address entity
public static RemoteAddressEntitySet toRemoteAddressEntities(java.util.Set<RemoteAddress> remoteAddresses,
java.net.URI baseUri)
RemoteAddresses to RemoteAddressEntitySet.
remoteAddresses - Remote addressesbaseUri - base URI of the application
public static RemoteAddressEntity toRemoteAddressEntity(RemoteAddress remoteAddress,
java.net.URI baseUri)
RemoteAddress to a RemoteAddressEntity.
remoteAddress - Remote addressbaseUri - base URI of the application remote addresses
public static java.util.Set<OperationType> toOperationTypes(java.util.Set<java.lang.String> types)
OperationType.
types - operation types in string
public static OperationType toOperationType(java.lang.String type)
OperationType.
type - operation type in string
public static java.util.Set<java.lang.String> toOperationTypeStrings(java.util.Set<OperationType> types)
OperationTypes to a set of operation type strings.
types - a set of OperationTypes
public static java.lang.String toOperationTypeString(OperationType type)
OperationType to an operation type string.
type - OperationType
public static ApplicationType toApplicationType(java.lang.String type)
ApplicationType.
type - application type in string
public static AttributeEntityList toAttributeEntities(java.util.Map<java.lang.String,java.lang.String> attributes)
AttributeEntityList.
attributes - Attributes of an entity
public static java.lang.Boolean getBoolean(java.lang.Boolean b)
b - boolean value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||