public interface MeterUtilityAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignMeterToUtility(Id meterId,
Id utilityId)
Adds an existing
Meter to a Utility. |
boolean |
canAssignMeters()
Tests if this user can alter meter/utility mappings.
|
boolean |
canAssignMetersToUtility(Id utilityId)
Tests if this user can alter meter/utility mappings.
|
IdList |
getAssignableUtilityIds(Id utilityId)
Gets a list of utilities including and under the given utility node in
which any meter can be assigned.
|
IdList |
getAssignableUtilityIdsForMeter(Id utilityId,
Id meterId)
Gets a list of utilities including and under the given utility node in
which a specific meter can be assigned.
|
void |
unassignMeterFromUtility(Id meterId,
Id utilityId)
Removes a
Meter from a Utility. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignMeters()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignMetersToUtility(Id utilityId)
PERMISSION_DENIED
. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.utilityId
- the Id
of the Utility
false
if mapping is not authorized, true
otherwiseNullArgumentException
- utilityId
is
null
mandatory
- This method must be implemented. IdList getAssignableUtilityIds(Id utilityId) throws OperationFailedException
utilityId
- the Id
of the Utility
Ids
NullArgumentException
- utilityId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableUtilityIdsForMeter(Id utilityId, Id meterId) throws OperationFailedException
utilityId
- the Id
of the Utility
meterId
- the Id
of the Meter
Ids
NullArgumentException
- utility
or
meterId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignMeterToUtility(Id meterId, Id utilityId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Meter
to a Utility.
meterId
- the Id
of the Meter
utilityId
- the Id
of the Utility
AlreadyExistsException
- meterId
is
already assigned to utilityId
NotFoundException
- meterId
or
utilityId
not foundNullArgumentException
- meterId
or
utilityId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignMeterFromUtility(Id meterId, Id utilityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Meter
from a Utility.
meterId
- the Id
of the Meter
utilityId
- the Id
of the Utility
NotFoundException
- meterId
or
utilityId
not found or meterId
not
assigned to utilityId
NullArgumentException
- meterId
or
utilityId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.