public interface AllocationAdminSession extends OsidSession
This session defines methods for managing quotas. Allocations can be assigned across all users in a directory structure or on a user by user basis.
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateAllocations()
Tests if this user can create allocations in this session for or under
the session directory.
|
boolean |
canCreateAllocationsForUsers()
Tests if this user can create allocations in this session for or under
the session directory for specific users.
|
boolean |
canCreateAllocationWithRecordTypes(Type[] allocationRecordTypes)
Tests if this user can create a single
Allocation using
the desired record types. |
boolean |
canCreateAllocationWithRecordTypesForUsers(Type[] allocationRecordTypes)
Tests if this user can create a single
Allocation using
the desired record types targeted for specific users. |
boolean |
canDeleteAllocations()
Tests if this user can delete allocations for directories in this
session.
|
boolean |
canDeleteAllocationsForUser()
Tests if this user can delete allocations for users in directories in
this session.
|
boolean |
canUpdateAllocations()
Tests if this user can update allocations for directories in this
session.
|
boolean |
canUpdateAllocationsForUsers()
Tests if this user can update allocations for users in directories in
this session.
|
Allocation |
createAllocation(AllocationForm allocationForm)
Creates a new allocation across all users for a directory.
|
Allocation |
createAllocationForUser(AllocationForm allocationForm)
Creates a new allocation for a specific user for a directory.
|
void |
deleteAllocation(java.lang.String name)
Deletes the allocation for a directory.
|
void |
deleteAllocationForUser(java.lang.String name,
Id agentId)
Deletes the allocation for a directory.
|
AllocationForm |
getAllocationFormForCreate(java.lang.String name,
Type[] allocationRecordTypes)
Gets the file form for creating new allocations across all users for a
directory.
|
AllocationForm |
getAllocationFormForCreateForUser(java.lang.String name,
Id agentId,
Type[] allocationRecordTypes)
Gets the file form for creating new allocations across all users for a
directory.
|
AllocationForm |
getAllocationFormForUpdate(java.lang.String name)
Gets the allocation form for updating an existing allocation.
|
AllocationForm |
getAllocationFormForUpdateForUser(java.lang.String name,
Id agentId)
Gets the allocation form for updating an existing allocation for a
user.
|
Directory |
getDirectory()
Gets the directory associated with this session.
|
java.lang.String |
getDirectoryPath()
Gets the absolute path of this directory.
|
void |
updateAllocation(AllocationForm allocationForm)
Updates an existing allocation.
|
void |
updateAllocationForUser(AllocationForm allocationForm)
Updates an existing allocation.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
java.lang.String getDirectoryPath()
mandatory
- This method must be implemented. Directory getDirectory() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateAllocations()
PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer create operations to unauthorized users. false
if filing allocation create methods are
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateAllocationWithRecordTypes(Type[] allocationRecordTypes)
Allocation
using
the desired record types. While
FilingAllocationManager.getAllocationRecordTypes()
can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific Allocation.
Providing an empty array tests if an Allocation
can be created with no records.allocationRecordTypes
- array of allocation record types true
if Allocation
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- allocationRecordTypes
is null
mandatory
- This method must be implemented. AllocationForm getAllocationFormForCreate(java.lang.String name, Type[] allocationRecordTypes) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
name
- name of a directoryallocationRecordTypes
- array of allocation record typesAlreadyExistsException
- allocation already existsNotFoundException
- name
not foundNullArgumentException
- name
or
allocationRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Allocation createAllocation(AllocationForm allocationForm) throws OperationFailedException, PermissionDeniedException
allocationForm
- the allocation formIllegalStateException
- allocationForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- allocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- fileForm
did not
originate from getAllocationFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateAllocations()
PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer update
operations to unauthorized users. false
if filing allocation update methods are
not authorized, true
otherwisemandatory
- This method must be implemented. AllocationForm getAllocationFormForUpdate(java.lang.String name) throws NotFoundException, OperationFailedException, PermissionDeniedException
name
- name of the directoryNotFoundException
- name
is not found or
no allocation existsNullArgumentException
- name
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateAllocation(AllocationForm allocationForm) throws OperationFailedException, PermissionDeniedException
allocationForm
- the form containing the elements to be updatedIllegalStateException
- allocationForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- allocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- allocationForm
did not originate from getAllocationFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteAllocations()
PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer delete
operations to unauthorized users. false
if filing allocation delete methods are
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteAllocation(java.lang.String name) throws NotFoundException, OperationFailedException, PermissionDeniedException
name
- the name of the directoryNotFoundException
- name
is not found or
no allocation existsNullArgumentException
- name
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateAllocationsForUsers()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer create operations to
unauthorized users. false
if user allocation create methods are not
authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateAllocationWithRecordTypesForUsers(Type[] allocationRecordTypes)
Allocation
using
the desired record types targeted for specific users. While
FilingAllocationManager.getAllocationRecordTypes()
can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific Allocation.
Providing an empty array tests if an Allocation
can be created with no records.allocationRecordTypes
- array of allocation record types true
if Allocation
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- allocationRecordTypes
is null
mandatory
- This method must be implemented. AllocationForm getAllocationFormForCreateForUser(java.lang.String name, Id agentId, Type[] allocationRecordTypes) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
name
- name of a directoryagentId
- the Id
of a userallocationRecordTypes
- array of allocation record typesAlreadyExistsException
- allocation already existsNotFoundException
- name
or
agentId
is not foundNullArgumentException
- name, agentId,
or allocationRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Allocation createAllocationForUser(AllocationForm allocationForm) throws OperationFailedException, PermissionDeniedException
allocationForm
- the allocation formIllegalStateException
- allocationForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- allocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- fileForm
did not
originate from getAllocationFormForCreateForUser()
mandatory
- This method must be implemented. boolean canUpdateAllocationsForUsers()
PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer update operations to unauthorized users. false
if filing allocation user update methods
are not authorized, true
otherwisemandatory
- This method must be implemented. AllocationForm getAllocationFormForUpdateForUser(java.lang.String name, Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
name
- name of the directoryagentId
- the Id
of the userNotFoundException
- name
or
agentId
is not found or no allocation existsNullArgumentException
- name
or
agentId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateAllocationForUser(AllocationForm allocationForm) throws OperationFailedException, PermissionDeniedException
allocationForm
- the form containing the elements to be updatedIllegalStateException
- allocationForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- allocationForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- allocationForm
did not originate from
getAllocationFormForUpdateForUser()
mandatory
- This method must be implemented. boolean canDeleteAllocationsForUser()
PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer delete operations to unauthorized users. false
if filing allocation delete methods are
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteAllocationForUser(java.lang.String name, Id agentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
name
- name of the directoryagentId
- the Id
of the userNotFoundException
- name
or
agentId
is not found or no allocation existsNullArgumentException
- name
or
agentId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.