Interface | osid.metering.UtilityAdminSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session creates, updates, and deletes Create and update operations differ in their usage. To
create a For updates, The delete operations delete This session includes an | ||
Method | canCreateUtilities | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Utility creation is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateUtilityWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | utilityRecordTypes | array of utility record types |
Return | boolean | true if Utility creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | utilityRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getUtilityFormForCreate | ||
Description |
Gets the utility form for creating new utilities. A new form should be requested for each create transaction. | ||
Parameters | osid.type.Type[] | utilityRecordTypes | array of utility record types |
Return | osid.metering.UtilityForm | the utility form | |
Errors | NULL_ARGUMENT | utilityRecordTypes is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | unable to get form for requested record types | ||
Compliance | mandatory | This method must be implemented. | |
Method | createUtility | ||
Description |
Creates a new | ||
Parameters | osid.metering.UtilityForm | utilityForm | the form for this Utility |
Return | osid.metering.Utility | the new Utility | |
Errors | ILLEGAL_STATE | utilityForm already used in a create transaction | |
INVALID_ARGUMENT | one or more of the form elements is invalid | ||
NULL_ARGUMENT | utilityForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | utilityForm did not originate from
getUtilityFormForCreate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateUtilities | ||
Description |
Tests if this user can update | ||
Return | boolean | false if Utility modification is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getUtilityFormForUpdate | ||
Description |
Gets the utility form for updating an existing utility. A new utility form should be requested for each update transaction. | ||
Parameters | osid.id.Id | utilityId | the Id of the Utility |
Return | osid.metering.UtilityForm | the utility form | |
Errors | NOT_FOUND | utilityId is not found | |
NULL_ARGUMENT | utilityId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateUtility | ||
Description |
Updates an existing utility. | ||
Parameters | osid.metering.UtilityForm | utilityForm | the form containing the elements to be updated |
Errors | ILLEGAL_STATE | utilityForm already used in an update transaction | |
INVALID_ARGUMENT | the form contains an invalid value | ||
NULL_ARGUMENT | utilityForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | utilityForm did not originate from
getUtilityFormForUpdate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteUtilities | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Utility deletion is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteUtility | ||
Description |
Deletes a | ||
Parameters | osid.id.Id | utilityId | the Id of the Utility to remove |
Errors | NOT_FOUND | utilityId not found | |
NULL_ARGUMENT | utilityId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canManageUtilityAliases | ||
Description |
Tests if this user can manage | ||
Return | boolean | false if Utility aliasing is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | aliasUtility | ||
Description |
Adds an | ||
Parameters | osid.id.Id | utilityId | the Id of a Utility |
osid.id.Id | aliasId | the alias Id | |
Errors | ALREADY_EXISTS | aliasId is already assigned | |
NOT_FOUND | utilityId not found | ||
NULL_ARGUMENT | utilityId or aliasId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |