Interface DeviceEnablerSystemAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign DeviceEnabler to
System mappings. A DeviceEnabler may appear in multiple
System objects and removing the last reference to a
DeviceEnabler is the equivalent of deleting it. Each System may
have its own authorizations governing who is allowed to operate on it.
Adding a reference of a DeviceEnabler to another
System is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignDeviceEnablerToSystem(Id deviceEnablerId, Id systemId) Adds an existingDeviceEnablerto aSystem.booleanTests if this user can alter device enabler/system mappings.booleancanAssignDeviceEnablersToSystem(Id systemId) Tests if this user can alter device enabler/system mappings.getAssignableSystemIds(Id systemId) Gets a list of systems including and under the given system node in which any device enabler can be assigned.getAssignableSystemIdsForDeviceEnabler(Id systemId, Id deviceEnablerId) Gets a list of systems including and under the given system node in which a specific device enabler can be assigned.voidreassignDeviceEnablerToSystem(Id deviceEnablerId, Id fromSystemId, Id toSystemId) Moves aDeviceEnablerfrom oneSystemto another.voidunassignDeviceEnablerFromSystem(Id deviceEnablerId, Id systemId) Removes aDeviceEnablerfrom aSystem.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignDeviceEnablers
boolean canAssignDeviceEnablers()Tests if this user can alter device enabler/system 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignDeviceEnablersToSystem
Tests if this user can alter device enabler/system 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
systemId- theIdof theSystem- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-systemIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableSystemIds
Gets a list of systems including and under the given system node in which any device enabler can be assigned.- Parameters:
systemId- theIdof theSystem- Returns:
- list of assignable system
Ids - Throws:
NullArgumentException-systemIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableSystemIdsForDeviceEnabler
IdList getAssignableSystemIdsForDeviceEnabler(Id systemId, Id deviceEnablerId) throws OperationFailedException Gets a list of systems including and under the given system node in which a specific device enabler can be assigned.- Parameters:
systemId- theIdof theSystemdeviceEnablerId- theIdof theDeviceEnabler- Returns:
- list of assignable system
Ids - Throws:
NullArgumentException-systemIdordeviceEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignDeviceEnablerToSystem
void assignDeviceEnablerToSystem(Id deviceEnablerId, Id systemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingDeviceEnablerto aSystem.- Parameters:
deviceEnablerId- theIdof theDeviceEnablersystemId- theIdof theSystem- Throws:
AlreadyExistsException-deviceEnablerIdalready assigned tosystemIdNotFoundException-deviceEnablerIdorsystemIdnot foundNullArgumentException-deviceEnablerIdorsystemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignDeviceEnablerFromSystem
void unassignDeviceEnablerFromSystem(Id deviceEnablerId, Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aDeviceEnablerfrom aSystem.- Parameters:
deviceEnablerId- theIdof theDeviceEnablersystemId- theIdof theSystem- Throws:
NotFoundException-deviceEnablerIdorsystemIdnot found ordeviceEnablerIdalready assigned tosystemIdNullArgumentException-deviceEnablerIdorsystemIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignDeviceEnablerToSystem
void reassignDeviceEnablerToSystem(Id deviceEnablerId, Id fromSystemId, Id toSystemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aDeviceEnablerfrom oneSystemto another. Mappings to otherSystemsare unaffected.- Parameters:
deviceEnablerId- theIdof theDeviceEnablerfromSystemId- theIdof the currentSystemtoSystemId- theIdof the destinationSystem- Throws:
AlreadyExistsException-deviceEnablerIdalready assigned totoSystemIdNotFoundException-deviceEnablerId, fromSystemId, ortoSystemIdnot found ordeviceEnablerIdnot mapped tofromSystemIdNullArgumentException-deviceEnablerId, fromSystemId, ortoSystemrIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-