public interface PeriodBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign Periods
to
Business
objects A Period
may appear in
multiple Business
objects and removing the last reference
to a Period
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 a Period
to another
Business
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignPeriodToCatalog(Id periodId,
Id businessId)
Adds an existing
Period to a Business. |
boolean |
canAssignPeriods()
Tests if this user can alter period/business mappings.
|
boolean |
canAssignPeriodsToBusiness(Id businessId)
Tests if this user can alter period/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any period can be assigned.
|
IdList |
getAssignableBusinessIdsForPeriod(Id businessId,
Id periodId)
Gets a list of businesses including and under the given business node
in which a specific period can be assigned.
|
void |
reassignPeriodToBusiness(Id periodId,
Id fromBusinessId,
Id toBusinessId)
Moves a
Period from one Business to
another. |
void |
unassignPeriodFromCatalog(Id periodId,
Id businessId)
Removes a
Period from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignPeriods()
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 canAssignPeriodsToBusiness(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 getAssignableBusinessIdsForPeriod(Id businessId, Id periodId) throws OperationFailedException
businessId
- the Id
of the Business
periodId
- the Id
of the Period
Ids
NullArgumentException
- businessId
or
periodId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignPeriodToCatalog(Id periodId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Period
to a Business.
periodId
- the Id
of the Period
businessId
- the Id
of the Business
AlreadyExistsException
- periodId
is
already assigned to businessId
NotFoundException
- periodId
or
businessId
not foundNullArgumentException
- periodId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignPeriodFromCatalog(Id periodId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Period
from a Business.
periodId
- the Id
of the Period
businessId
- the Id
of the Business
NotFoundException
- periodId
or
businessId
not found or periodId
not
assigned to businessId
NullArgumentException
- periodId
or
businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignPeriodToBusiness(Id periodId, Id fromBusinessId, Id toBusinessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Period
from one Business
to
another. Mappings to other Businesses
are unaffected.periodId
- the Id
of the Period
fromBusinessId
- the Id
of the current
Business
toBusinessId
- the Id
of the destination
Business
NotFoundException
- periodId, fromBusinessId,
or toBusinessId
not found or
periodId
not mapped to fromBusinessId
NullArgumentException
- periodId,
fromBusinessId,
or toBusinessId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.