Interface TodoProducerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes todo producers. The data for create
and update is provided via the TodoProducerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasTodoProducer(Id todoProducerId, Id aliasId) Adds anIdto aTodoProducerfor the purpose of creating compatibility.booleanTests if this user can create todo producers.booleancanCreateTodoProducerWithRecordTypes(Type[] todoProducerRecordTypes) Tests if this user can create a singleTodoProducerusing the desired record types.booleanTests if this user can delete todo producers.booleanTests if this user can manageIdaliases for todo producers.booleanTests if this user can update todo producers.createTodoProducer(TodoProducerForm todoProducerForm) Creates a newTodoProducer.voiddeleteTodoProducer(Id todoProducerId) Deletes aTodoProducer.Gets theChecklistassociated with this session.Gets theChecklistIdassociated with this session.getTodoProducerFormForCreate(Type[] todoProducerRecordTypes) Gets the todo producer form for creating new todo producers.getTodoProducerFormForUpdate(Id todoProducerId) Gets the todo producer form for updating an existing todo producer.voidupdateTodoProducer(TodoProducerForm todoProducerForm) Updates an existing todo producer.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
-
getChecklistId
Id getChecklistId()Gets theChecklistIdassociated with this session.- Returns:
- the
Checklist Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getChecklist
Gets theChecklistassociated with this session.- Returns:
- the checklist
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateTodoProducer
boolean canCreateTodoProducer()Tests if this user can create todo producers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aTodoProducerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifTodoProducercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateTodoProducerWithRecordTypes
Tests if this user can create a singleTodoProducerusing the desired record types. WhileChecklistMasonManager.getTodoProducerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificTodoProducer. Providing an empty array tests if aTodoProducercan be created with no records.- Parameters:
todoProducerRecordTypes- array of todo producer record types- Returns:
trueifTodoProducercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-todoProducerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getTodoProducerFormForCreate
TodoProducerForm getTodoProducerFormForCreate(Type[] todoProducerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the todo producer form for creating new todo producers. A new form should be requested for each create transaction.- Parameters:
todoProducerRecordTypes- array of todo producer record types- Returns:
- the todo producer form
- Throws:
NullArgumentException-todoProducerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createTodoProducer
TodoProducer createTodoProducer(TodoProducerForm todoProducerForm) throws OperationFailedException, PermissionDeniedException Creates a newTodoProducer.- Parameters:
todoProducerForm- the form for thisTodoProducer- Returns:
- the new
TodoProducer - Throws:
IllegalStateException-todoProducerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-todoProducerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-todoProducerFormdid not originate fromgetTodoProducerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateTodoProducers
boolean canUpdateTodoProducers()Tests if this user can update todo producers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aTodoProducerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifTodoProducermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getTodoProducerFormForUpdate
TodoProducerForm getTodoProducerFormForUpdate(Id todoProducerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the todo producer form for updating an existing todo producer. A new todo producer form should be requested for each update transaction.- Parameters:
todoProducerId- theIdof theTodoProducer- Returns:
- the todo producer form
- Throws:
NotFoundException-todoProducerIdis not foundNullArgumentException-todoProducerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateTodoProducer
void updateTodoProducer(TodoProducerForm todoProducerForm) throws OperationFailedException, PermissionDeniedException Updates an existing todo producer.- Parameters:
todoProducerForm- the form containing the elements to be updated- Throws:
IllegalStateException-todoProducerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-todoProducerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-todoProducerFormdid not originate fromgetTodoProducerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteTodoProducers
boolean canDeleteTodoProducers()Tests if this user can delete todo producers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aTodoProducerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifTodoProducerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteTodoProducer
void deleteTodoProducer(Id todoProducerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aTodoProducer.- Parameters:
todoProducerId- theIdof theTodoProducerto remove- Throws:
NotFoundException-todoProducerIdnot foundNullArgumentException-todoProducerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageTodoProducerAliases
boolean canManageTodoProducerAliases()Tests if this user can manageIdaliases for todo producers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifTodoProduceraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasTodoProducer
void aliasTodoProducer(Id todoProducerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aTodoProducerfor the purpose of creating compatibility. The primaryIdof theTodoProduceris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another todo producer. it is reassigned to the given todo producerId.- Parameters:
todoProducerId- theIdof aTodoProduceraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-todoProducerIdnot foundNullArgumentException-todoProducerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-