org.kuali.student.core.document.service
Interface DocumentService

All Superinterfaces:
DictionaryService
All Known Implementing Classes:
DocumentServiceImpl

public interface DocumentService
extends DictionaryService


Method Summary
 StatusInfo addDocumentCategoryToDocument(String documentId, String documentCategoryKey)
          Adds an existing document category to a document.
 DocumentInfo createDocument(String documentTypeKey, String documentCategoryKey, DocumentInfo documentInfo)
          Creates a new document.
 RefDocRelationInfo createRefDocRelation(String refObjectTypeKey, String refObjectId, String documentId, String refDocRelationTypeKey, RefDocRelationInfo refDocRelationInfo)
          Creates a relationship between a reference and a document.
 StatusInfo deleteDocument(String documentId)
          Deletes an existing document.
 StatusInfo deleteRefDocRelation(String refDocRelationId)
          Removes a relationship between a reference and a document.
 List<DocumentCategoryInfo> getCategoriesByDocument(String documentId)
          Retrieves category information for a document.
 DocumentInfo getDocument(String documentId)
          Retrieves information about a document.
 List<DocumentCategoryInfo> getDocumentCategories()
          Retrieves the list of document categories known by this service
 DocumentCategoryInfo getDocumentCategory(String documentCategoryKey)
          Retrieves information about a particular document category
 List<DocumentInfo> getDocumentsByIdList(List<String> documentIdList)
          Retrieves information about documents from a list of identifiers.
 DocumentTypeInfo getDocumentType(String documentTypeKey)
          Retrieves information about a particular document type
 List<DocumentTypeInfo> getDocumentTypes()
          Retrieves the list of document types known by this service
 RefDocRelationInfo getRefDocRelation(String refDocRelationId)
          Retrieves information about a relationship between a reference and document.
 List<RefDocRelationInfo> getRefDocRelationsByDoc(String documentId)
          Retrieves information about reference document relationships for a particular document.
 List<RefDocRelationInfo> getRefDocRelationsByRef(String refObjectTypeKey, String refObjectId)
          Retrieves information about reference document relationships for a particular reference.
 List<RefDocRelationTypeInfo> getRefDocRelationTypes()
          Retrieves the list of types for a given base type which can be connected to a document.
 List<RefDocRelationTypeInfo> getRefDocRelationTypesForRefObjectSubType(String refSubTypeKey)
          Retrieves the list of reference document relation types which are allowed for a given reference subtype.
 List<String> getRefObjectSubTypes(String refObjectTypeKey)
          Retrieves the list of types for a given base type which can be connected to a document.
 List<String> getRefObjectTypes()
          Retrieves the list of base types which can be connected to a document.
 StatusInfo removeDocumentCategoryFromDocument(String documentId, String documentCategoryKey)
          Removes an existing category from a document.
 DocumentInfo updateDocument(String documentId, DocumentInfo documentInfo)
          Updates an existing document.
 RefDocRelationInfo updateRefDocRelation(String refDocRelationId, RefDocRelationInfo refDocRelationInfo)
          Updates a relationship between a reference and a document.
 List<ValidationResultInfo> validateDocument(String validationType, DocumentInfo documentInfo)
          Validates a document.
 List<ValidationResultInfo> validateRefDocRelation(String validationType, RefDocRelationInfo refDocRelationInfo)
          Validates a reference document relationship.
 
Methods inherited from interface org.kuali.student.common.dictionary.service.DictionaryService
getObjectStructure, getObjectTypes
 

Method Detail

getDocumentTypes

List<DocumentTypeInfo> getDocumentTypes()
                                        throws OperationFailedException
Retrieves the list of document types known by this service

Returns:
list of document type information
Throws:
OperationFailedException - unable to complete request

getDocumentType

DocumentTypeInfo getDocumentType(String documentTypeKey)
                                 throws DoesNotExistException,
                                        InvalidParameterException,
                                        MissingParameterException,
                                        OperationFailedException
Retrieves information about a particular document type

Parameters:
documentTypeKey - document type identifier
Returns:
document type information
Throws:
DoesNotExistException - specified documentTypeKey not found
InvalidParameterException - invalid documentTypeKey
MissingParameterException - documentTypeKey not specified
OperationFailedException - unable to complete request

getDocumentCategories

List<DocumentCategoryInfo> getDocumentCategories()
                                                 throws OperationFailedException
Retrieves the list of document categories known by this service

Returns:
list of document category information
Throws:
OperationFailedException - unable to complete request

getDocumentCategory

DocumentCategoryInfo getDocumentCategory(String documentCategoryKey)
                                         throws DoesNotExistException,
                                                InvalidParameterException,
                                                MissingParameterException,
                                                OperationFailedException
Retrieves information about a particular document category

Parameters:
documentCategoryKey - document category identifier
Returns:
document category information
Throws:
DoesNotExistException - specified documentCategoryKey not found
InvalidParameterException - invalid documentCategoryKey
MissingParameterException - documentCategoryKey not specified
OperationFailedException - unable to complete request

getRefObjectTypes

List<String> getRefObjectTypes()
                               throws OperationFailedException
Retrieves the list of base types which can be connected to a document.

Returns:
the list of types which can be connected to a document
Throws:
OperationFailedException - unable to complete request

getRefObjectSubTypes

List<String> getRefObjectSubTypes(String refObjectTypeKey)
                                  throws MissingParameterException,
                                         OperationFailedException
Retrieves the list of types for a given base type which can be connected to a document.

Parameters:
refObjectTypeKey - Reference Type Identifier
Returns:
the list of types for the given base type which can be connected to a document
Throws:
OperationFailedException - unable to complete request
MissingParameterException

getRefDocRelationTypes

List<RefDocRelationTypeInfo> getRefDocRelationTypes()
                                                    throws OperationFailedException
Retrieves the list of types for a given base type which can be connected to a document.

Returns:
the list of reference document relation types
Throws:
OperationFailedException - unable to complete request

getRefDocRelationTypesForRefObjectSubType

List<RefDocRelationTypeInfo> getRefDocRelationTypesForRefObjectSubType(String refSubTypeKey)
                                                                       throws DoesNotExistException,
                                                                              InvalidParameterException,
                                                                              MissingParameterException,
                                                                              OperationFailedException
Retrieves the list of reference document relation types which are allowed for a given reference subtype.

Parameters:
refSubTypeKey - reference subtype
Returns:
the list of reference document relation types which are allowed for a given referenced subtype.
Throws:
DoesNotExistException - specified refSubTypeKey not found
InvalidParameterException - invalid refSubTypeKey
MissingParameterException - refSubTypeKey not specified
OperationFailedException - unable to complete request

getDocument

DocumentInfo getDocument(String documentId)
                         throws DoesNotExistException,
                                InvalidParameterException,
                                MissingParameterException,
                                OperationFailedException,
                                PermissionDeniedException
Retrieves information about a document.

Parameters:
documentId - identifier of the document
Returns:
information about a document
Throws:
DoesNotExistException - documentId not found
InvalidParameterException - invalid documentId
MissingParameterException - missing documentId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getDocumentsByIdList

List<DocumentInfo> getDocumentsByIdList(List<String> documentIdList)
                                        throws DoesNotExistException,
                                               InvalidParameterException,
                                               MissingParameterException,
                                               OperationFailedException,
                                               PermissionDeniedException
Retrieves information about documents from a list of identifiers.

Parameters:
documentIdList - list of document identifiers
Returns:
list of document information
Throws:
DoesNotExistException - one of more documentIds not found
InvalidParameterException - one of more invalid documentIds
MissingParameterException - missing documentIdList
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getCategoriesByDocument

List<DocumentCategoryInfo> getCategoriesByDocument(String documentId)
                                                   throws DoesNotExistException,
                                                          InvalidParameterException,
                                                          MissingParameterException,
                                                          OperationFailedException,
                                                          PermissionDeniedException
Retrieves category information for a document.

Parameters:
documentId - identifier of the document
Returns:
list of document category information
Throws:
DoesNotExistException - documentId not found
InvalidParameterException - invalid documentId
MissingParameterException - missing documentId
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getRefDocRelation

RefDocRelationInfo getRefDocRelation(String refDocRelationId)
                                     throws DoesNotExistException,
                                            InvalidParameterException,
                                            MissingParameterException,
                                            OperationFailedException,
                                            PermissionDeniedException
Retrieves information about a relationship between a reference and document.

Parameters:
refDocRelationId - reference document relationship identifier
Returns:
information about a relationship between a reference and a document
Throws:
DoesNotExistException - specified relationship not found
InvalidParameterException - invalid refDocRelationId
MissingParameterException - refDocRelationId not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getRefDocRelationsByRef

List<RefDocRelationInfo> getRefDocRelationsByRef(String refObjectTypeKey,
                                                 String refObjectId)
                                                 throws DoesNotExistException,
                                                        InvalidParameterException,
                                                        MissingParameterException,
                                                        OperationFailedException,
                                                        PermissionDeniedException
Retrieves information about reference document relationships for a particular reference.

Parameters:
refObjectTypeKey - reference type
refObjectId - reference identifier
Returns:
list of reference document relationships
Throws:
DoesNotExistException - specified refId, refObjectTypeKey not found
InvalidParameterException - invalid refId, refObjectTypeKey
MissingParameterException - refId, refObjectTypeKey not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

getRefDocRelationsByDoc

List<RefDocRelationInfo> getRefDocRelationsByDoc(String documentId)
                                                 throws DoesNotExistException,
                                                        InvalidParameterException,
                                                        MissingParameterException,
                                                        OperationFailedException,
                                                        PermissionDeniedException
Retrieves information about reference document relationships for a particular document.

Parameters:
documentId - document identifier
Returns:
list of reference document relationships
Throws:
DoesNotExistException - specified document not found
InvalidParameterException - invalid documentId
MissingParameterException - documentId not specified
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

validateDocument

List<ValidationResultInfo> validateDocument(String validationType,
                                            DocumentInfo documentInfo)
                                            throws DoesNotExistException,
                                                   InvalidParameterException,
                                                   MissingParameterException,
                                                   OperationFailedException
Validates a document. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the document (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the document can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.

Parameters:
validationType - identifier of the extent of validation
documentInfo - document information to be tested.
Returns:
results from performing the validation
Throws:
DoesNotExistException - validationTypeKey not found
InvalidParameterException - invalid validationTypeKey, documentInfo
MissingParameterException - missing validationTypeKey, documentInfo
OperationFailedException - unable to complete request

createDocument

DocumentInfo createDocument(String documentTypeKey,
                            String documentCategoryKey,
                            DocumentInfo documentInfo)
                            throws DataValidationErrorException,
                                   InvalidParameterException,
                                   MissingParameterException,
                                   OperationFailedException,
                                   PermissionDeniedException,
                                   DoesNotExistException
Creates a new document.

Parameters:
documentTypeKey - identifier of the document type
documentCategoryKey - identifier of the document category
documentInfo - detailed information on the document
Returns:
detailed information on the document created
Throws:
DataValidationErrorException - One or more values invalid for this operation
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
DoesNotExistException

updateDocument

DocumentInfo updateDocument(String documentId,
                            DocumentInfo documentInfo)
                            throws DataValidationErrorException,
                                   DoesNotExistException,
                                   InvalidParameterException,
                                   MissingParameterException,
                                   OperationFailedException,
                                   PermissionDeniedException,
                                   VersionMismatchException
Updates an existing document.

Parameters:
documentId - identifier of the document to update
documentInfo - updated information for the document
Returns:
updated information on the document
Throws:
DataValidationErrorException - One or more values invalid for this operation
DoesNotExistException - Document being updated does not exist
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException - The action was attempted on an out of date version.

deleteDocument

StatusInfo deleteDocument(String documentId)
                          throws DoesNotExistException,
                                 InvalidParameterException,
                                 MissingParameterException,
                                 OperationFailedException,
                                 PermissionDeniedException
Deletes an existing document.

Parameters:
documentId - identifier of the document to delete
Returns:
status of the operation (success, failed)
Throws:
DoesNotExistException - Document to delete does not exist
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

addDocumentCategoryToDocument

StatusInfo addDocumentCategoryToDocument(String documentId,
                                         String documentCategoryKey)
                                         throws DataValidationErrorException,
                                                DoesNotExistException,
                                                InvalidParameterException,
                                                MissingParameterException,
                                                OperationFailedException,
                                                PermissionDeniedException,
                                                VersionMismatchException
Adds an existing document category to a document.

Parameters:
documentId - identifier of the document
documentCategoryKey - identifier of the document category
Returns:
status of the operation (success, failed)
Throws:
DataValidationErrorException - One or more values invalid for this operation
DoesNotExistException - documentId, documentCategoryKey does not exist
InvalidParameterException - one or more parameters invalid
MissingParameterException - one or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException - action was attempted on an out of date version.

removeDocumentCategoryFromDocument

StatusInfo removeDocumentCategoryFromDocument(String documentId,
                                              String documentCategoryKey)
                                              throws DoesNotExistException,
                                                     InvalidParameterException,
                                                     MissingParameterException,
                                                     OperationFailedException,
                                                     PermissionDeniedException
Removes an existing category from a document.

Parameters:
documentId - identifier of the document
documentCategoryKey - identifier of the document category
Returns:
status of the operation (success, failed)
Throws:
DoesNotExistException - documentId, documentCategoryKey does not exist
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

validateRefDocRelation

List<ValidationResultInfo> validateRefDocRelation(String validationType,
                                                  RefDocRelationInfo refDocRelationInfo)
                                                  throws DoesNotExistException,
                                                         InvalidParameterException,
                                                         MissingParameterException,
                                                         OperationFailedException
Validates a reference document relationship. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the comment (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the comment can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.

Parameters:
validationType - identifier of the extent of validation
refDocRelationInfo - reference document relationship information to be tested.
Returns:
results from performing the validation
Throws:
DoesNotExistException - validationTypeKey not found
InvalidParameterException - invalid validationTypeKey, refDocRelationInfo
MissingParameterException - missing validationTypeKey, refDocRelationInfo
OperationFailedException - unable to complete request

createRefDocRelation

RefDocRelationInfo createRefDocRelation(String refObjectTypeKey,
                                        String refObjectId,
                                        String documentId,
                                        String refDocRelationTypeKey,
                                        RefDocRelationInfo refDocRelationInfo)
                                        throws DataValidationErrorException,
                                               InvalidParameterException,
                                               MissingParameterException,
                                               OperationFailedException,
                                               PermissionDeniedException
Creates a relationship between a reference and a document.

Parameters:
refObjectTypeKey - reference type
refObjectId - identifier of the reference
documentId - identifier of the document
refDocRelationTypeKey - type of relationship between reference and document
refDocRelationInfo - detailed information about the reference/document relationship
Returns:
detailed information about the relationship
Throws:
DataValidationErrorException - One or more values invalid for this operation
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

updateRefDocRelation

RefDocRelationInfo updateRefDocRelation(String refDocRelationId,
                                        RefDocRelationInfo refDocRelationInfo)
                                        throws DataValidationErrorException,
                                               InvalidParameterException,
                                               MissingParameterException,
                                               OperationFailedException,
                                               PermissionDeniedException,
                                               VersionMismatchException,
                                               DoesNotExistException
Updates a relationship between a reference and a document.

Parameters:
refDocRelationId - identifier of a relationship between a reference and document
refDocRelationInfo - detailed information about the relationship between a reference and document
Returns:
detailed information about the relationship between a reference and document
Throws:
DataValidationErrorException - One or more values invalid for this operation
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure
VersionMismatchException
DoesNotExistException

deleteRefDocRelation

StatusInfo deleteRefDocRelation(String refDocRelationId)
                                throws DoesNotExistException,
                                       InvalidParameterException,
                                       MissingParameterException,
                                       OperationFailedException,
                                       PermissionDeniedException
Removes a relationship between a reference and a document.

Parameters:
refDocRelationId - identifier of the relationship between the reference and document
Returns:
status of the operation (success, failed)
Throws:
DoesNotExistException - relationship does not exist
InvalidParameterException - One or more parameters invalid
MissingParameterException - One or more parameters missing
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.