OSID Logo
OSID Specifications
metering package
Version 3.1.0
Interfaceosid.metering.MeterUtilityAssignmentSession
Implementsosid.OsidSession
Used Byosid.metering.MeteringManager
osid.metering.MeteringProxyManager
Description

This session provides methods to re-assign Meters to Utility objects A Meter may appear in multiple Utility objects and removing the last reference to a Meter is the equivalent of deleting it. Each Utility may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a Meter to another Utility is not a copy operation (eg: does not change its Id).

MethodcanAssignMeters
Description

Tests if this user can alter meter/utility mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignMetersToUtility
Description

Tests if this user can alter meter/utility mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Parametersosid.id.IdutilityId the Id of the Utility
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT utilityId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableUtilityIds
Description

Gets a list of utilities including and under the given utility node in which any meter can be assigned.

Parametersosid.id.IdutilityId the Id of the Utility
Returnosid.id.IdList list of assignable utility Ids
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableUtilityIdsForMeter
Description

Gets a list of utilities including and under the given utility node in which a specific meter can be assigned.

Parametersosid.id.IdutilityId the Id of the Utility
osid.id.IdmeterId the Id of the Meter
Returnosid.id.IdList list of assignable utility Ids
ErrorsNULL_ARGUMENT utility or meterId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignMeterToUtility
Description

Adds an existing Meter to a Utility.

Parametersosid.id.IdmeterId the Id of the Meter
osid.id.IdutilityId the Id of the Utility
ErrorsALREADY_EXISTS meterId is already assigned to utilityId
NOT_FOUND meterId or utilityId not found
NULL_ARGUMENT meterId or utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignMeterFromUtility
Description

Removes a Meter from a Utility.

Parametersosid.id.IdmeterId the Id of the Meter
osid.id.IdutilityId the Id of the Utility
ErrorsNOT_FOUND meterId or utilityId not found or meterId not assigned to utilityId
NULL_ARGUMENT meterId or utilityId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.