com.atlassian.crowd.manager.directory.bulk
Class BulkAddPrincipalsOperation

java.lang.Object
  extended by com.atlassian.crowd.manager.directory.bulk.BulkAddEntityOperation<RemotePrincipal>
      extended by com.atlassian.crowd.manager.directory.bulk.BulkAddPrincipalsOperation

public class BulkAddPrincipalsOperation
extends BulkAddEntityOperation<RemotePrincipal>


Constructor Summary
BulkAddPrincipalsOperation()
           
 
Method Summary
 java.lang.String getPermissionErrorKey()
          The i18n key to use when reporting a permission error.
 PermissionType getRequiredPermission()
          The permission required to perform the operation.
 void performAdd(RemoteDirectory directory, RemotePrincipal entity)
          Add a single entity to a directory.
 java.util.Collection<RemotePrincipal> performAddAllViaBatch(BatchingRemoteDirectory directory, java.util.Set<RemotePrincipal> entities)
          Batch add a set of entities.
 RemotePrincipal performFindByName(RemoteDirectory directory, java.lang.String name)
          Find an entity in a directory.
 void performRemove(RemoteDirectory directory, java.lang.String name)
          Remove an entity from a directory.
 
Methods inherited from class com.atlassian.crowd.manager.directory.bulk.BulkAddEntityOperation
performAddAllIndividually, prepareForAdd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkAddPrincipalsOperation

public BulkAddPrincipalsOperation()
Method Detail

getRequiredPermission

public PermissionType getRequiredPermission()
Description copied from class: BulkAddEntityOperation
The permission required to perform the operation.

Specified by:
getRequiredPermission in class BulkAddEntityOperation<RemotePrincipal>
Returns:
permission type.

getPermissionErrorKey

public java.lang.String getPermissionErrorKey()
Description copied from class: BulkAddEntityOperation
The i18n key to use when reporting a permission error.

Specified by:
getPermissionErrorKey in class BulkAddEntityOperation<RemotePrincipal>
Returns:
i18n permission error key.

performFindByName

public RemotePrincipal performFindByName(RemoteDirectory directory,
                                         java.lang.String name)
                                  throws ObjectNotFoundException
Description copied from class: BulkAddEntityOperation
Find an entity in a directory.

Specified by:
performFindByName in class BulkAddEntityOperation<RemotePrincipal>
Parameters:
directory - directory to search.
name - name of entity.
Returns:
entity object.
Throws:
ObjectNotFoundException - if the entity with the given name cannot be found in the directory.

performRemove

public void performRemove(RemoteDirectory directory,
                          java.lang.String name)
                   throws ObjectNotFoundException
Description copied from class: BulkAddEntityOperation
Remove an entity from a directory.

Specified by:
performRemove in class BulkAddEntityOperation<RemotePrincipal>
Parameters:
directory - directory to remove from.
name - name of entity to remove.
Throws:
ObjectNotFoundException - if the entity with the given name cannot be found in the directory.

performAddAllViaBatch

public java.util.Collection<RemotePrincipal> performAddAllViaBatch(BatchingRemoteDirectory directory,
                                                                   java.util.Set<RemotePrincipal> entities)
Description copied from class: BulkAddEntityOperation
Batch add a set of entities.

Specified by:
performAddAllViaBatch in class BulkAddEntityOperation<RemotePrincipal>
Parameters:
directory - directory to add to.
entities - entities to add.
Returns:
collection of entities that FAILED to be added.

performAdd

public void performAdd(RemoteDirectory directory,
                       RemotePrincipal entity)
                throws java.lang.Exception
Description copied from class: BulkAddEntityOperation
Add a single entity to a directory.

Specified by:
performAdd in class BulkAddEntityOperation<RemotePrincipal>
Parameters:
directory - directory to add to.
entity - entity to add.
Throws:
java.lang.Exception - if the operation failed.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.