Class DirectoryMapping

java.lang.Object
com.atlassian.crowd.model.application.DirectoryMapping
All Implemented Interfaces:
ApplicationDirectoryMapping, Serializable

@Deprecated public class DirectoryMapping extends Object implements Serializable, ApplicationDirectoryMapping
Deprecated.
Use ApplicationDirectoryMapping instead. Since 2.12.
Represents a mapping between an application and a directory. Only directories with a mapping to an application are visible to the application.
See Also:
  • Constructor Details

    • DirectoryMapping

      protected DirectoryMapping()
      Deprecated.
    • DirectoryMapping

      public DirectoryMapping(Long id, Application application, Directory directory, boolean allowAllToAuthenticate)
      Deprecated.
      Constructs a new DirectoryMapping. Used by XML import.
      Parameters:
      id - ID of the directory mapping
      application - Application to map
      directory - Directory to map
      allowAllToAuthenticate - set to true if all users in directory are allowed to authenticate
    • DirectoryMapping

      public DirectoryMapping(Application application, Directory directory, boolean allowAllToAuthenticate)
      Deprecated.
      Constructs a new DirectoryMapping.
      Parameters:
      application - application to map
      directory - directory to map
      allowAllToAuthenticate - set to true if all users in directory are allowed to authenticate
    • DirectoryMapping

      public DirectoryMapping(Application application, Directory directory, boolean allowAllToAuthenticate, Set<OperationType> allowedOperations)
      Deprecated.
      Constructs a new DirectoryMapping.
      Parameters:
      application - application to map
      directory - directory to map
      allowAllToAuthenticate - set to true if all users in directory are allowed to authenticate
      allowedOperations - the set of operations the application is allowed to perform on the directory
  • Method Details

    • getId

      public Long getId()
      Deprecated.
      Returns the ID of the directory mapping.
    • getApplication

      public Application getApplication()
      Deprecated.
      Returns the mapped application.
      Returns:
      mapped application
    • getDirectory

      public Directory getDirectory()
      Deprecated.
      Returns the mapped directory.
      Specified by:
      getDirectory in interface ApplicationDirectoryMapping
      Returns:
      mapped directory
    • isAllowAllToAuthenticate

      public boolean isAllowAllToAuthenticate()
      Deprecated.
      Description copied from interface: ApplicationDirectoryMapping
      Returns true if all the users in the directory are allowed to authenticate with the application. If the value is false, then the user is required to be in an authorised group.
      Specified by:
      isAllowAllToAuthenticate in interface ApplicationDirectoryMapping
      Returns:
      true if all the users in the directory are allowed to authenticate with the application
      See Also:
    • setAllowAllToAuthenticate

      public void setAllowAllToAuthenticate(boolean allowAllToAuthenticate)
      Deprecated.
      Sets whether all the users in the directory are allowed to authenticate with the application.
      Parameters:
      allowAllToAuthenticate - set to true if all the users in the directory are allowed to authenticate with the application.
    • getAuthorisedGroupNames

      public Set<String> getAuthorisedGroupNames()
      Deprecated.
      Description copied from interface: ApplicationDirectoryMapping
      Returns a set of mappings to groups that are authorised to authenticate with the application. This set is not used if ApplicationDirectoryMapping.isAllowAllToAuthenticate() returns true.
      Specified by:
      getAuthorisedGroupNames in interface ApplicationDirectoryMapping
      Returns:
      set of mappings to groups that are authorised to authenticate with the application
    • getAuthorisedGroups

      public Set<GroupMapping> getAuthorisedGroups()
      Deprecated.
    • setAuthorisedGroups

      public void setAuthorisedGroups(Set<GroupMapping> authorisedGroups)
      Deprecated.
    • isAuthorised

      public boolean isAuthorised(String groupName)
      Deprecated.
      Returns true if the group is an authorised group. i.e. it is allowed
      Parameters:
      groupName - name of group
      Returns:
      true if the group is an authorised group.
    • getGroupMapping

      @Nullable public GroupMapping getGroupMapping(String groupName)
      Deprecated.
      Returns a GroupMapping if it exists, otherwise returns null
      Parameters:
      groupName - name of the group to find
      Returns:
      the GroupMapping or null
    • addGroupMapping

      public void addGroupMapping(String groupName)
      Deprecated.
      Adds a mapping to a new authorised group.
      Parameters:
      groupName - name of new authorised group
    • removeGroupMapping

      public void removeGroupMapping(String groupName)
      Deprecated.
      Unauthorises a group.
      Parameters:
      groupName - name of group to unauthorise
    • addAllowedOperations

      public void addAllowedOperations(OperationType... operationTypes)
      Deprecated.
      Adds a list of operations that the application is allowed to perform on the directory.
      Parameters:
      operationTypes - list of operations that the application is allowed to perform on the directory
    • addAllowedOperation

      public void addAllowedOperation(OperationType operationType)
      Deprecated.
      Add a new operation that the application is allowed to perform on the directory.
      Parameters:
      operationType - new operation that the application is allowed to perform on the directory
    • getAllowedOperations

      public Set<OperationType> getAllowedOperations()
      Deprecated.
      Description copied from interface: ApplicationDirectoryMapping
      Returns a set of operations that the application is allowed to perform on the directory.
      Specified by:
      getAllowedOperations in interface ApplicationDirectoryMapping
      Returns:
      set of operations that the application is allowed to perform on the directory
    • setAllowedOperations

      public void setAllowedOperations(Set<OperationType> allowedOperations)
      Deprecated.
      Sets (i.e. replaces) the list of operations that the application is allowed to perform on the directory.
      Parameters:
      allowedOperations - set of operations that the application is allowed to perform on the directory
    • isAllowed

      public boolean isAllowed(OperationType operation)
      Deprecated.
      Returns true if the application is allowed to perform the specified operation on the directory.
      Parameters:
      operation - operation to check
      Returns:
      true if the application is allowed to perform the specified operation on the directory
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • fromApplicationDirectoryMapping

      public static DirectoryMapping fromApplicationDirectoryMapping(Application application, ApplicationDirectoryMapping applicationDirectoryMapping)
      Deprecated.