public interface EntryBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Entries
to
Business
objects An Entry
may appear in
multiple Business
objects and removing the last reference
to an Entry
is the equivalent of deleting it. Each
Business
may have its own authorizations governing who is allowed
to operate on it.
Adding a reference of an Entry
to another
Business
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignEntryToBusiness(Id entryId,
Id businessId)
Adds an existing
Entry to a Business. |
boolean |
canAssignEntries()
Tests if this user can alter entry/business mappings.
|
boolean |
canAssignEntriesToBusiness(Id businessId)
Tests if this user can alter entry/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any entry can be assigned.
|
IdList |
getAssignableBusinessIdsForEntry(Id businessId,
Id entryId)
Gets a list of businesses including and under the given business node
in which a specific entry can be assigned.
|
void |
reassignEntryToBusiness(Id entryId,
Id fromBusinessId,
Id toBusinessId)
Moves an
Entry from one Business to
another. |
void |
unassignEntryFromBusiness(Id entryId,
Id businessId)
Removes an
Entry from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignEntries()
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 canAssignEntriesToBusiness(Id businessId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users.businessId
- the Id
of the Business
false
if mapping is not authorized, true
otherwiseNullArgumentException
- businessId
is
null
mandatory
- This method must be implemented. IdList getAssignableBusinessIds(Id businessId) throws OperationFailedException
businessId
- the Id
of the Business
Ids
NullArgumentException
- businessId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableBusinessIdsForEntry(Id businessId, Id entryId) throws OperationFailedException
businessId
- the Id
of the Business
entryId
- the Id
of the Entry
Ids
NullArgumentException
- businessId
or
entryId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignEntryToBusiness(Id entryId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Entry
to a Business.
entryId
- the Id
of the Entry
businessId
- the Id
of the Business
AlreadyExistsException
- entryId
is
already assigned to businessId
NotFoundException
- entryId
or
businessId
not foundNullArgumentException
- entryId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignEntryFromBusiness(Id entryId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Entry
from a Business.
entryId
- the Id
of the Entry
businessId
- the Id
of the Business
NotFoundException
- entryId
or
businessId
not found or entryId
not
assigned to businessId
NullArgumentException
- entryId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignEntryToBusiness(Id entryId, Id fromBusinessId, Id toBusinessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Entry
from one Business
to
another. Mappings to other Businesses
are unaffected.entryId
- the Id
of the Entry
fromBusinessId
- the Id
of the current
Business
toBusinessId
- the Id
of the destination
Business
NotFoundException
- entryId, fromBusinessId,
or toBusinessId
not found or
entryId
not mapped to fromBusinessId
NullArgumentException
- entryId, fromBusinessId,
or toBusinessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.