OSID Logo
OSID Specifications
metering package
Version 3.0.0
Release Candidate Preview
Interfaceosid.metering.MeterUtilityAssignmentSession
Implementsosid.OsidSession
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
CompliancemandatoryThis 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.IdutilityIdthe Id of the Utility
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT utilityId is null
CompliancemandatoryThis 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.IdutilityIdthe Id of the Utility
Returnosid.id.IdListlist of assignable utility Ids
ErrorsNULL_ARGUMENT utilityId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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.IdutilityIdthe Id of the Utility
osid.id.IdmeterIdthe Id of the Meter
Returnosid.id.IdListlist of assignable utility Ids
ErrorsNULL_ARGUMENT utility or meterId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignMeterToUtility
Description

Adds an existing Meter to a Utility.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdutilityIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignMeterFromUtility
Description

Removes a Meter from a Utility.

Parametersosid.id.IdmeterIdthe Id of the Meter
osid.id.IdutilityIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.