public interface FiscalPeriodBusinessAssignmentSession extends OsidSession
This session provides methods to re-assign FiscalPeriods
to Business
objects A FiscalPeriod
may
appear in multiple Business
objects and removing the last
reference to a FiscalPeriod
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 FiscalPeriod
to another
Business
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignFiscalPeriodToBusiness(Id fiscalPeriodId,
Id businessId)
Adds an existing
FiscalPeriod to a Business. |
boolean |
canAssignFiscalPeriods()
Tests if this user can alter fiscal period/business mappings.
|
boolean |
canAssignFiscalPeriodToBusiness(Id businessId)
Tests if this user can alter fiscal period/business mappings.
|
IdList |
getAssignableBusinessIds(Id businessId)
Gets a list of businesses including and under the given business node
in which any fiscal period can be assigned.
|
IdList |
getAssignableBusinessIdsForFiscalPeriod(Id businessId,
Id fiscalPeriodId)
Gets a list of businesses including and under the given business node
in which a specific fiscal period can be assigned.
|
void |
unassignFiscalPeriodFromBusiness(Id fiscalPeriodId,
Id businessId)
Removes a
FiscalPeriod from a Business. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignFiscalPeriods()
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 canAssignFiscalPeriodToBusiness(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 getAssignableBusinessIdsForFiscalPeriod(Id businessId, Id fiscalPeriodId) throws OperationFailedException
businessId
- the Id
of the Business
fiscalPeriodId
- the Id
of the
FiscalPeriod
Ids
NullArgumentException
- businessId
or
fiscalPeriodId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignFiscalPeriodToBusiness(Id fiscalPeriodId, Id businessId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
FiscalPeriod
to a Business.
fiscalPeriodId
- the Id
of the
FiscalPeriod
businessId
- the Id
of the Business
AlreadyExistsException
- fiscalPeriodId
is already assigned to businessId
NotFoundException
- fiscalPeriodId
or
businessId
not foundNullArgumentException
- fiscalPeriodId
or businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignFiscalPeriodFromBusiness(Id fiscalPeriodId, Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
FiscalPeriod
from a Business.
fiscalPeriodId
- the Id
of the
FiscalPeriod
businessId
- the Id
of the Business
NotFoundException
- fiscalPeriodId
or
businessId
not found or fiscalPeriodId
not assigned to businessId
NullArgumentException
- fiscalPeriodId
or businessId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.