OSID Logo
OSID Specifications
filing allocation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.filing.allocation.AllocationAdminSession
Implementsosid.OsidSession
Description

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.

MethodgetDirectoryPath
Description

Gets the absolute path of this directory.

Returnstringthe absolute path of this directory
CompliancemandatoryThis method must be implemented.
MethodgetDirectory
Description

Gets the directory associated with this session.

Returnosid.filing.Directorythe directory associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateAllocations
Description

Tests if this user can create allocations in this session for or under the session directory. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to unauthorized users.

Returnboolean false if filing allocation create methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateAllocationWithRecordTypes
Description

Tests if this user can create a single 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.

Parametersosid.type.Type[]allocationRecordTypesarray of allocation record types
Returnboolean true if Allocation creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT allocationRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAllocationFormForCreate
Description

Gets the file form for creating new allocations across all users for a directory. A new form should be requested for each create transaction.

Parametersstringnamename of a directory
osid.type.Type[]allocationRecordTypesarray of allocation record types
Returnosid.filing.allocation.AllocationFormthe allocation form
ErrorsALREADY_EXISTSallocation already exists
NOT_FOUND name not found
NULL_ARGUMENT name or allocationRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAllocation
Description

Creates a new allocation across all users for a directory.

Parametersosid.filing.allocation.AllocationFormallocationFormthe allocation form
Returnosid.filing.allocation.Allocationthe new allocation
ErrorsILLEGAL_STATE allocationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT allocationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED fileForm did not originate from getAllocationFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAllocations
Description

Tests if this user can update allocations for directories in this session. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to unauthorized users.

Returnboolean false if filing allocation update methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAllocationFormForUpdate
Description

Gets the allocation form for updating an existing allocation. A new file form should be requested for each update transaction.

Parametersstringnamename of the directory
Returnosid.filing.allocation.AllocationFormthe allocation form
ErrorsNOT_FOUND name is not found or no allocation exists
NULL_ARGUMENT name is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAllocation
Description

Updates an existing allocation.

Parametersosid.filing.allocation.AllocationFormallocationFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE allocationForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT allocationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED allocationForm did not originate from getAllocationFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAllocations
Description

Tests if this user can delete allocations for directories in this session. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to unauthorized users.

Returnboolean false if filing allocation delete methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteAllocation
Description

Deletes the allocation for a directory.

Parametersstringnamethe name of the directory
ErrorsNOT_FOUND name is not found or no allocation exists
NULL_ARGUMENT name is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateAllocationsForUsers
Description

Tests if this user can create allocations in this session for or under the session directory for specific users. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to unauthorized users.

Returnboolean false if user allocation create methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateAllocationWithRecordTypesForUsers
Description

Tests if this user can create a single 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.

Parametersosid.type.Type[]allocationRecordTypesarray of allocation record types
Returnboolean true if Allocation creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT allocationRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAllocationFormForCreateForUser
Description

Gets the file form for creating new allocations across all users for a directory. A new form should be requested for each create transaction.

Parametersstringnamename of a directory
osid.id.IdagentIdthe Id of a user
osid.type.Type[]allocationRecordTypesarray of allocation record types
Returnosid.filing.allocation.AllocationFormthe allocation form
ErrorsALREADY_EXISTSallocation already exists
NOT_FOUND name or agentId is not found
NULL_ARGUMENT name, agentId, or allocationRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAllocationForUser
Description

Creates a new allocation for a specific user for a directory.

Parametersosid.filing.allocation.AllocationFormallocationFormthe allocation form
Returnosid.filing.allocation.Allocationthe new allocation
ErrorsILLEGAL_STATE allocationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT allocationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED fileForm did not originate from getAllocationFormForCreateForUser()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAllocationsForUsers
Description

Tests if this user can update allocations for users in directories in this session. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to unauthorized users.

Returnboolean false if filing allocation user update methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAllocationFormForUpdateForUser
Description

Gets the allocation form for updating an existing allocation for a user. A new file form should be requested for each update transaction.

Parametersstringnamename of the directory
osid.id.IdagentIdthe Id of the user
Returnosid.filing.allocation.AllocationFormthe allocation form
ErrorsNOT_FOUND name or agentId is not found or no allocation exists
NULL_ARGUMENT name or agentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAllocationForUser
Description

Updates an existing allocation.

Parametersosid.filing.allocation.AllocationFormallocationFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE allocationForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT allocationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED allocationForm did not originate from getAllocationFormForUpdateForUser()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAllocationsForUser
Description

Tests if this user can delete allocations for users in directories in this session. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to unauthorized users.

Returnboolean false if filing allocation delete methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteAllocationForUser
Description

Deletes the allocation for a directory.

Parametersstringnamename of the directory
osid.id.IdagentIdthe Id of the user
ErrorsNOT_FOUND name or agentId is not found or no allocation exists
NULL_ARGUMENT name or agentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.