pt.digitalis.dif.utils.extensions.document
Class AbstractDocumentRepository

java.lang.Object
  extended by pt.digitalis.dif.utils.extensions.document.AbstractDocumentRepository
All Implemented Interfaces:
IDocumentRepositoryManager

public abstract class AbstractDocumentRepository
extends Object
implements IDocumentRepositoryManager

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
11 de Mar de 2011

Constructor Summary
AbstractDocumentRepository()
           
 
Method Summary
 void authorizeDocumentForCurrentSession(IDIFSession session, Long documentID)
          Declares the requested document to be declared as authorized access for the current session scope.
 List<DocumentRepositoryEntry> getDocumentsByIds(List<Long> documentIds)
          Get DocumentRepositoryEntry by ids
 boolean isDocumentAuthorizedInCurrentSession(IDIFSession session, Long documentID)
          Searches the authorization list in session for the document ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pt.digitalis.dif.utils.extensions.document.IDocumentRepositoryManager
addDocument, addDocument, deleteDocument, getDocument, getDocumentByOriginalFileName, getDocumentsByCreator, updateDocument
 

Constructor Detail

AbstractDocumentRepository

public AbstractDocumentRepository()
Method Detail

authorizeDocumentForCurrentSession

public void authorizeDocumentForCurrentSession(IDIFSession session,
                                               Long documentID)
Description copied from interface: IDocumentRepositoryManager
Declares the requested document to be declared as authorized access for the current session scope. If not called an access to this document will result in an Authorization Exception

Specified by:
authorizeDocumentForCurrentSession in interface IDocumentRepositoryManager
Parameters:
session - the current session
documentID - the document ID to authorize
See Also:
IDocumentRepositoryManager.authorizeDocumentForCurrentSession(pt.digitalis.dif.controller.interfaces.IDIFSession, java.lang.Long)

getDocumentsByIds

public List<DocumentRepositoryEntry> getDocumentsByIds(List<Long> documentIds)
                                                throws DocumentRepositoryException
Description copied from interface: IDocumentRepositoryManager
Get DocumentRepositoryEntry by ids

Specified by:
getDocumentsByIds in interface IDocumentRepositoryManager
Parameters:
documentIds - the array of document ids
Returns:
List of DocumentRepositoryEntry
Throws:
DocumentRepositoryException
See Also:
IDocumentRepositoryManager.getDocumentsByIds(java.util.List)

isDocumentAuthorizedInCurrentSession

public boolean isDocumentAuthorizedInCurrentSession(IDIFSession session,
                                                    Long documentID)
Description copied from interface: IDocumentRepositoryManager
Searches the authorization list in session for the document ID

Specified by:
isDocumentAuthorizedInCurrentSession in interface IDocumentRepositoryManager
Parameters:
session - the current session
documentID - the document ID to check for authorization
Returns:
T if the document is authorized
See Also:
IDocumentRepositoryManager.isDocumentAuthorizedInCurrentSession(pt.digitalis.dif.controller.interfaces.IDIFSession, java.lang.Long)


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.