public interface IntersectionAdminSession extends OsidSession
This session creates, updates, and deletes Intersections.
The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or
update and may not be reused.
Create and update operations differ in their usage. To create an
Intersection, an IntersectionForm is
requested using getIntersectionFormForCreate() specifying
the desired paths and record Types or none if no record
Types are needed. The returned IntersectionForm
will indicate that it is to be used with a create operation and
can be used to examine metdata or validate data prior to creation. Once
the IntersectionForm is submiited to a create operation, it
cannot be reused with another create operation unless the first operation
was unsuccessful. Each IntersectionForm corresponds to an
attempted transaction.
For updates, IntersectionForms are requested to the
Intersection Id that is to be updated using
getIntersectionFormForUpdate(). Similarly, the
IntersectionForm has metadata about the data that can be updated
and it can perform validation before submitting the update. The
IntersectionForm can only be used once for a successful update and
cannot be reused.
The delete operations delete Intersections. To unmap an
Intersection from the current Map, the
IntersectionMapAssignmentSession should be used. These
delete operations attempt to remove the Intersection itself
thus removing it from all known Map catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
addPathToIntersection(Id intersectionId,
Id pathId)
Adds a path to an existing intersection.
|
void |
aliasIntersection(Id intersectionId,
Id aliasId)
Adds an
Id to an Intersection for the
purpose of creating compatibility. |
boolean |
canCreateIntersections()
Tests if this user can create
Intersections. |
boolean |
canCreateIntersectionWithRecordTypes(Type[] intersectionRecordTypes)
Tests if this user can create a single
Intersection
using the desired record types. |
boolean |
canDeleteIntersections()
Tests if this user can delete
Intersections. |
boolean |
canManageIntersectionAliases()
Tests if this user can manage
Id aliases for
Intersections. |
boolean |
canUpdateIntersection(Id intersectionId)
Tests if this user can update a specified
Intersection. |
boolean |
canUpdateIntersections()
Tests if this user can update
Intersections. |
Intersection |
createIntersection(IntersectionForm intersectionForm)
Creates a new
Intersection. |
void |
deleteIntersection(Id intersectionId)
Deletes an
Intersection. |
IntersectionForm |
getIntersectionFormForCreate(Id[] pathIds,
Type[] intersectionRecordTypes)
Gets the intersection form for creating new intersections.
|
IntersectionForm |
getIntersectionFormForUpdate(Id intersectionId)
Gets the intersection form for updating an existing intersection.
|
Map |
getMap()
Gets the
Map associated with this session. |
Id |
getMapId()
Gets the
Map Id associated with this
session. |
void |
removePathFromIntersection(Id intersectionId,
Id pathId)
Removes a path from an existing intersection.
|
void |
updateIntersection(IntersectionForm intersectionForm)
Updates an existing intersection.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getMapId()
Map Id associated with this
session. Map Id associated with this sessionmandatory - This method must be implemented. Map getMap() throws OperationFailedException, PermissionDeniedException
Map associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateIntersections()
Intersections. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known creating an Intersection
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer create operations
to unauthorized users. false if Intersection creation
is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateIntersectionWithRecordTypes(Type[] intersectionRecordTypes)
Intersection
using the desired record types. While
MappingPathManager.getIntersectionRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Intersection.
Providing an empty array tests if an Intersection can
be created with no records.intersectionRecordTypes - array of intersection record types true if Intersection creation
using the specified record Types is supported,
false otherwiseNullArgumentException - intersectionRecordTypes
is null mandatory - This method must be implemented. IntersectionForm getIntersectionFormForCreate(Id[] pathIds, Type[] intersectionRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
pathIds - the Id of the pathsintersectionRecordTypes - array of intersection record typesNotFoundException - a pathId is not
foundNullArgumentException - pathIds or
intersectionRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get a form with given
record typesmandatory - This method must be implemented. Intersection createIntersection(IntersectionForm intersectionForm) throws OperationFailedException, PermissionDeniedException
Intersection. intersectionForm - an intersection form Intersection IllegalStateException - intersectionForm
already used in a create transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - pathIds or
intersectionForm is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - intersectionForm
did not originate from getIntersectionFormForCreate()
mandatory - This method must be implemented. boolean canUpdateIntersections()
Intersections. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known updating an Intersection
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer update operations
to an unauthorized user. false if Intersection
modification is not authorized, true otherwisemandatory - This method must be implemented. boolean canUpdateIntersection(Id intersectionId)
Intersection.
A return of true does not guarantee successful authorization. A return
of false indicates that it is known updating the Intersection
will result in a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer an
update operation to an unauthorized user for this intersection.intersectionId - the Id of the
Intersection false if intersection modification is not
authorized, true otherwiseNullArgumentException - intersectionId
is null mandatory - This method must be implemented. If - the intersectionId is not found, then it is
acceptable to return false to indicate the lack of an update
available. IntersectionForm getIntersectionFormForUpdate(Id intersectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
intersectionId - the Id of the
Intersection NotFoundException - intersectionId is
not foundNullArgumentException - intersectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateIntersection(IntersectionForm intersectionForm) throws OperationFailedException, PermissionDeniedException
intersectionForm - the form containing the elements to be
updatedIllegalStateException - intersectionForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - intersectionForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - intersectionForm
did not originate from getIntersectionFormForUpdate()
mandatory - This method must be implemented. void addPathToIntersection(Id intersectionId, Id pathId) throws NotFoundException, OperationFailedException, PermissionDeniedException
intersectionId - the Id of the
Intersection pathId - the Id of the a Path NotFoundException - intersectionId or
pathId is not foundNullArgumentException - intersectionId
or pathId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canDeleteIntersections()
Intersections. A return
of true does not guarantee successful authorization. A return of false
indicates that it is known deleting an Intersection
will result in a PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer delete operations
to unauthorized users. false if Intersection deletion
is not authorized, true otherwisemandatory - This method must be implemented. void deleteIntersection(Id intersectionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Intersection. intersectionId - the Id of the
Intersection to removeNotFoundException - intersectionId not
foundNullArgumentException - intersectionId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removePathFromIntersection(Id intersectionId, Id pathId) throws NotFoundException, OperationFailedException, PermissionDeniedException
intersectionId - the Id of the
Intersection pathId - the Id of the Path to
removeNotFoundException - intersectionId or
pathId not foundNullArgumentException - intersectionId
or pathId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageIntersectionAliases()
Id aliases for
Intersections. A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false if Intersection aliasing
is not authorized, true otherwisemandatory - This method must be implemented. void aliasIntersection(Id intersectionId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to an Intersection for the
purpose of creating compatibility. The primary Id of
the Intersection is determined by the provider. The new
Id performs as an alias to the primary Id.
intersectionId - the Id of an Intersection
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - intersectionId not
foundNullArgumentException - intersectionId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.