Ontimize Document Management 0.035EN

com.ontimize.dms.server.entities
Class EDocumentBase

java.lang.Object
  extended by TableEntity
      extended by com.ontimize.db.EODMS
          extended by com.ontimize.dms.server.entities.EDocumentBase
All Implemented Interfaces:
IODMSDocument

public abstract class EDocumentBase
extends EODMS
implements IODMSDocument


Field Summary
protected static java.util.Map ALIAS_JCR_2_ENTITY
           
protected static java.lang.String MSG_GET_ENTITY_NAME_NULL
           
protected static java.lang.String MSG_GET_ENTITY_REF_NULL
           
protected static java.lang.String MSG_GET_NODE_ACCESS_READ
           
protected static java.lang.String MSG_GET_NODE_ACCESS_WRITE
           
protected static java.lang.String MSG_GET_NODE_LOCKED_NULL
           
protected static java.lang.String MSG_GET_NODE_LOCKED_READ
           
protected static java.lang.String MSG_GET_NODE_LOCKED_UPLOAD
           
protected static java.lang.String MSG_GET_NODE_LOCKED_WRITE
           
protected static java.lang.String MSG_GET_NODE_NULL
           
protected static java.lang.String MSG_LINK_PARENT_NULL
           
protected static java.lang.String MSG_LINK_TARGET_NULL
           
protected static java.lang.String MSG_LIST_NODE_NULL
           
protected static java.lang.String MSG_OP_CREATE_ERROR
           
protected static java.lang.String MSG_OP_DELETE_ERROR
           
protected static java.lang.String MSG_OP_GET_DATE_ERROR
           
protected static java.lang.String MSG_OP_GET_LIST_ERROR
           
protected static java.lang.String MSG_OP_INSERT_DIR_ERROR
           
protected static java.lang.String MSG_OP_INSERT_ERROR
           
protected static java.lang.String MSG_OP_INSERT_FILE_ERROR
           
protected static java.lang.String MSG_OP_INSERT_LINK_ERROR
           
protected static java.lang.String MSG_OP_LOCK_ERROR
           
protected static java.lang.String MSG_OP_PASTE_ERROR
           
protected static java.lang.String MSG_OP_QUERY_ERROR
           
protected static java.lang.String MSG_OP_REMOVE_ERROR
           
protected static java.lang.String MSG_OP_RENAME_ERROR
           
protected static java.lang.String MSG_OP_RESET_ERROR
           
protected static java.lang.String MSG_OP_SEARCH_ERROR
           
protected static java.lang.String MSG_PARAM_EXTRA_FIELDS_NULL
           
protected static java.lang.String MSG_PARAM_FIELDS_NULL
           
protected static java.lang.String MSG_PARAM_GENERATE_NAMES_NULL
           
protected static java.lang.String MSG_PARAM_HIDDEN_FIELDS_NULL
           
protected static java.lang.String MSG_PARAM_INSERT_NULL
           
protected static java.lang.String MSG_PARAM_KEYS_NULL
           
protected static java.lang.String MSG_PARAM_NULL
           
protected static java.lang.String MSG_PARAM_PARENT_FIELDS_NULL
           
protected static java.lang.String MSG_PARAM_QUERY_DEEP_NULL
           
protected static java.lang.String MSG_PARAM_QUERY_NULL
           
protected static java.lang.String MSG_PARAM_TARGET_NAMES_NULL
           
protected static java.lang.String MSG_PARAM_TARGET_NODES_NULL
           
protected static java.lang.String MSG_UPDATE_INVALID
           
 
Fields inherited from class com.ontimize.db.EODMS
LOCK_PERMISSION, MSG_CHECK, MSG_CHECK_PARAMS_CODE, MSG_CHECK_PARAMS_DOC, MSG_CHECK_PARAMS_ID, MSG_CHECK_PARAMS_MAP, MSG_CHECK_PARAMS_MAP1, MSG_CHECK_PARAMS_MAP2, MSG_L, MSG_L_ERROR, MSG_SESSION_ERROR, READ_DOCUMENT_PERMISSION, READ_PROPERTY_PERMISSION, READ_VERSION_PERMISSION, RESET_PERMISSION, WRITE_DOCUMENT_PERMISSION, WRITE_PROPERTY_PERMISSION, WRITE_VERSION_PERMISSION
 
Constructor Summary
EDocumentBase(EntityReferenceLocator l, DatabaseConnectionManager db, int port)
           
 
Method Summary
protected  java.lang.Object createGenericDocument(int code, Document[] document, java.util.Map params, int sessionId, int isDirectory)
          Creates documents or directories
 EntityResult delete(java.util.Hashtable kv, int sessionId)
          Removes the nodes from the given parent and the filter fields search.
 EntityResult delete(java.util.Hashtable kv, int sessionId, java.sql.Connection con)
           
 java.lang.Object deleteDocument(int code, Document[] document, java.util.Map params, int sessionId)
           
 EntityResult getData(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object getDocumentDate(int code, Document[] document, java.util.Map params, int sessionId)
          Context params come from clietn cache.
 EntityResult getDocuments(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object has(int code, Document[] documents, java.util.Map params, int sessionId)
           
 EntityResult insert(java.util.Hashtable av, int sessionId)
          Inserts a new document record in the repository.
 EntityResult insert(java.util.Hashtable av, int sessionId, java.sql.Connection con)
           
 java.lang.Object lock(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object newDirectories(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object newDocuments(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object newLink(int code, Document parent, java.util.Map params, int sessionId)
           
 java.lang.Object pasteDocument(int code, Document[] document, java.util.Map params, int sessionId)
           
 EntityResult query(java.util.Hashtable kv, java.util.Vector av, int sessionId)
          Returns a document list with the given fields List and filter by the given Map fields.
 EntityResult query(java.util.Hashtable kv, java.util.Vector av, int sessionId, java.sql.Connection con)
           
 java.lang.Object renameDocument(int code, Document[] document, java.util.Map params, int sessionId)
           
 java.lang.Object reset(int code, Document[] document, java.util.Map params, int sessionId)
           
abstract  java.lang.Object search(int code, Document[] document, java.util.Map params, int sessionId)
           
 EntityResult update(java.util.Hashtable av, java.util.Hashtable kv, int sessionId)
           
 EntityResult update(java.util.Hashtable av, java.util.Hashtable kv, int sessionId, java.sql.Connection con)
           
 
Methods inherited from class com.ontimize.db.EODMS
check, checkBoolean, checkParams, checkParams, checkPermissions, checkPermissions, createResult, doCheck, getLogEntity, getSession, readProperties, readProperties, readProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_PARAM_NULL

protected static final java.lang.String MSG_PARAM_NULL
See Also:
Constant Field Values

MSG_PARAM_KEYS_NULL

protected static final java.lang.String MSG_PARAM_KEYS_NULL
See Also:
Constant Field Values

MSG_PARAM_FIELDS_NULL

protected static final java.lang.String MSG_PARAM_FIELDS_NULL
See Also:
Constant Field Values

MSG_PARAM_EXTRA_FIELDS_NULL

protected static final java.lang.String MSG_PARAM_EXTRA_FIELDS_NULL
See Also:
Constant Field Values

MSG_PARAM_HIDDEN_FIELDS_NULL

protected static final java.lang.String MSG_PARAM_HIDDEN_FIELDS_NULL
See Also:
Constant Field Values

MSG_PARAM_PARENT_FIELDS_NULL

protected static final java.lang.String MSG_PARAM_PARENT_FIELDS_NULL
See Also:
Constant Field Values

MSG_PARAM_GENERATE_NAMES_NULL

protected static final java.lang.String MSG_PARAM_GENERATE_NAMES_NULL
See Also:
Constant Field Values

MSG_PARAM_TARGET_NODES_NULL

protected static final java.lang.String MSG_PARAM_TARGET_NODES_NULL
See Also:
Constant Field Values

MSG_PARAM_TARGET_NAMES_NULL

protected static final java.lang.String MSG_PARAM_TARGET_NAMES_NULL
See Also:
Constant Field Values

MSG_PARAM_QUERY_NULL

protected static final java.lang.String MSG_PARAM_QUERY_NULL
See Also:
Constant Field Values

MSG_PARAM_QUERY_DEEP_NULL

protected static final java.lang.String MSG_PARAM_QUERY_DEEP_NULL
See Also:
Constant Field Values

MSG_PARAM_INSERT_NULL

protected static final java.lang.String MSG_PARAM_INSERT_NULL
See Also:
Constant Field Values

MSG_LIST_NODE_NULL

protected static final java.lang.String MSG_LIST_NODE_NULL
See Also:
Constant Field Values

MSG_GET_ENTITY_NAME_NULL

protected static final java.lang.String MSG_GET_ENTITY_NAME_NULL
See Also:
Constant Field Values

MSG_GET_ENTITY_REF_NULL

protected static final java.lang.String MSG_GET_ENTITY_REF_NULL
See Also:
Constant Field Values

MSG_UPDATE_INVALID

protected static final java.lang.String MSG_UPDATE_INVALID
See Also:
Constant Field Values

MSG_OP_GET_LIST_ERROR

protected static final java.lang.String MSG_OP_GET_LIST_ERROR
See Also:
Constant Field Values

MSG_OP_SEARCH_ERROR

protected static final java.lang.String MSG_OP_SEARCH_ERROR
See Also:
Constant Field Values

MSG_OP_INSERT_DIR_ERROR

protected static final java.lang.String MSG_OP_INSERT_DIR_ERROR
See Also:
Constant Field Values

MSG_OP_INSERT_FILE_ERROR

protected static final java.lang.String MSG_OP_INSERT_FILE_ERROR
See Also:
Constant Field Values

MSG_OP_CREATE_ERROR

protected static final java.lang.String MSG_OP_CREATE_ERROR
See Also:
Constant Field Values

MSG_OP_INSERT_LINK_ERROR

protected static final java.lang.String MSG_OP_INSERT_LINK_ERROR
See Also:
Constant Field Values

MSG_OP_REMOVE_ERROR

protected static final java.lang.String MSG_OP_REMOVE_ERROR
See Also:
Constant Field Values

MSG_OP_PASTE_ERROR

protected static final java.lang.String MSG_OP_PASTE_ERROR
See Also:
Constant Field Values

MSG_OP_RENAME_ERROR

protected static final java.lang.String MSG_OP_RENAME_ERROR
See Also:
Constant Field Values

MSG_OP_GET_DATE_ERROR

protected static final java.lang.String MSG_OP_GET_DATE_ERROR
See Also:
Constant Field Values

MSG_OP_LOCK_ERROR

protected static final java.lang.String MSG_OP_LOCK_ERROR
See Also:
Constant Field Values

MSG_OP_RESET_ERROR

protected static final java.lang.String MSG_OP_RESET_ERROR
See Also:
Constant Field Values

MSG_OP_QUERY_ERROR

protected static final java.lang.String MSG_OP_QUERY_ERROR
See Also:
Constant Field Values

MSG_OP_INSERT_ERROR

protected static final java.lang.String MSG_OP_INSERT_ERROR
See Also:
Constant Field Values

MSG_OP_DELETE_ERROR

protected static final java.lang.String MSG_OP_DELETE_ERROR
See Also:
Constant Field Values

MSG_LINK_PARENT_NULL

protected static final java.lang.String MSG_LINK_PARENT_NULL
See Also:
Constant Field Values

MSG_LINK_TARGET_NULL

protected static final java.lang.String MSG_LINK_TARGET_NULL
See Also:
Constant Field Values

MSG_GET_NODE_NULL

protected static final java.lang.String MSG_GET_NODE_NULL
See Also:
Constant Field Values

MSG_GET_NODE_LOCKED_UPLOAD

protected static final java.lang.String MSG_GET_NODE_LOCKED_UPLOAD
See Also:
Constant Field Values

MSG_GET_NODE_LOCKED_NULL

protected static final java.lang.String MSG_GET_NODE_LOCKED_NULL
See Also:
Constant Field Values

MSG_GET_NODE_LOCKED_READ

protected static final java.lang.String MSG_GET_NODE_LOCKED_READ
See Also:
Constant Field Values

MSG_GET_NODE_LOCKED_WRITE

protected static final java.lang.String MSG_GET_NODE_LOCKED_WRITE
See Also:
Constant Field Values

MSG_GET_NODE_ACCESS_READ

protected static final java.lang.String MSG_GET_NODE_ACCESS_READ
See Also:
Constant Field Values

MSG_GET_NODE_ACCESS_WRITE

protected static final java.lang.String MSG_GET_NODE_ACCESS_WRITE
See Also:
Constant Field Values

ALIAS_JCR_2_ENTITY

protected static java.util.Map ALIAS_JCR_2_ENTITY
Constructor Detail

EDocumentBase

public EDocumentBase(EntityReferenceLocator l,
                     DatabaseConnectionManager db,
                     int port)
              throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getData

public EntityResult getData(int code,
                            Document[] document,
                            java.util.Map params,
                            int sessionId)
                     throws java.lang.Exception
Specified by:
getData in interface IODMSDocument
Throws:
java.lang.Exception

getDocuments

public EntityResult getDocuments(int code,
                                 Document[] document,
                                 java.util.Map params,
                                 int sessionId)
                          throws java.lang.Exception
Specified by:
getDocuments in interface IODMSDocument
Throws:
java.lang.Exception

search

public abstract java.lang.Object search(int code,
                                        Document[] document,
                                        java.util.Map params,
                                        int sessionId)
                                 throws java.lang.Exception
Specified by:
search in interface IODMSDocument
Throws:
java.lang.Exception

has

public java.lang.Object has(int code,
                            Document[] documents,
                            java.util.Map params,
                            int sessionId)
                     throws java.lang.Exception
Specified by:
has in interface IODMSDocument
Throws:
java.lang.Exception

createGenericDocument

protected java.lang.Object createGenericDocument(int code,
                                                 Document[] document,
                                                 java.util.Map params,
                                                 int sessionId,
                                                 int isDirectory)
                                          throws java.lang.Exception
Creates documents or directories

Parameters:
document - => selected document in ODMSComponent it can be or directory or file. If it is a direcory files will be added in it and if if it is a file files will be added in the same directory which contents the document
Throws:
java.lang.Exception

newDocuments

public java.lang.Object newDocuments(int code,
                                     Document[] document,
                                     java.util.Map params,
                                     int sessionId)
                              throws java.lang.Exception
Specified by:
newDocuments in interface IODMSDocument
Throws:
java.lang.Exception

newDirectories

public java.lang.Object newDirectories(int code,
                                       Document[] document,
                                       java.util.Map params,
                                       int sessionId)
                                throws java.lang.Exception
Specified by:
newDirectories in interface IODMSDocument
Throws:
java.lang.Exception

newLink

public java.lang.Object newLink(int code,
                                Document parent,
                                java.util.Map params,
                                int sessionId)
                         throws java.lang.Exception
Specified by:
newLink in interface IODMSDocument
Throws:
java.lang.Exception

deleteDocument

public java.lang.Object deleteDocument(int code,
                                       Document[] document,
                                       java.util.Map params,
                                       int sessionId)
                                throws java.lang.Exception
Specified by:
deleteDocument in interface IODMSDocument
Throws:
java.lang.Exception

pasteDocument

public java.lang.Object pasteDocument(int code,
                                      Document[] document,
                                      java.util.Map params,
                                      int sessionId)
                               throws java.lang.Exception
Specified by:
pasteDocument in interface IODMSDocument
Throws:
java.lang.Exception

renameDocument

public java.lang.Object renameDocument(int code,
                                       Document[] document,
                                       java.util.Map params,
                                       int sessionId)
                                throws java.lang.Exception
Specified by:
renameDocument in interface IODMSDocument
Throws:
java.lang.Exception

getDocumentDate

public java.lang.Object getDocumentDate(int code,
                                        Document[] document,
                                        java.util.Map params,
                                        int sessionId)
                                 throws java.lang.Exception

Context params come from clietn cache. No context is available.

Specified by:
getDocumentDate in interface IODMSDocument
Parameters:
params - Map with the current action. Current context is not available.
Throws:
java.lang.Exception

lock

public java.lang.Object lock(int code,
                             Document[] document,
                             java.util.Map params,
                             int sessionId)
                      throws java.lang.Exception
Specified by:
lock in interface IODMSDocument
Throws:
java.lang.Exception

reset

public java.lang.Object reset(int code,
                              Document[] document,
                              java.util.Map params,
                              int sessionId)
                       throws java.lang.Exception
Specified by:
reset in interface IODMSDocument
Throws:
java.lang.Exception

query

public EntityResult query(java.util.Hashtable kv,
                          java.util.Vector av,
                          int sessionId)
                   throws java.lang.Exception

Returns a document list with the given fields List and filter by the given Map fields.

Throws:
java.lang.Exception

query

public EntityResult query(java.util.Hashtable kv,
                          java.util.Vector av,
                          int sessionId,
                          java.sql.Connection con)
                   throws java.lang.Exception
Throws:
java.lang.Exception

delete

public EntityResult delete(java.util.Hashtable kv,
                           int sessionId)
                    throws java.lang.Exception

Removes the nodes from the given parent and the filter fields search.
- Document.DOCUMENT: Node to remove (no fields are given). Root if is null.
- Filter fields: Fields and related value existing in the node.

The delete operation is recursive. In a directory, removes all the children.

Throws:
java.lang.Exception

delete

public EntityResult delete(java.util.Hashtable kv,
                           int sessionId,
                           java.sql.Connection con)
                    throws java.lang.Exception
Throws:
java.lang.Exception

insert

public EntityResult insert(java.util.Hashtable av,
                           int sessionId)
                    throws java.lang.Exception

Inserts a new document record in the repository.
- Parent node is given by the Document.DOCUMENT key.
- The document name is contained in the Document.NAME key.

Once created, the record can store the files uploaded.

Throws:
java.lang.Exception

insert

public EntityResult insert(java.util.Hashtable av,
                           int sessionId,
                           java.sql.Connection con)
                    throws java.lang.Exception
Throws:
java.lang.Exception

update

public EntityResult update(java.util.Hashtable av,
                           java.util.Hashtable kv,
                           int sessionId)
                    throws java.lang.Exception
Throws:
java.lang.Exception

update

public EntityResult update(java.util.Hashtable av,
                           java.util.Hashtable kv,
                           int sessionId,
                           java.sql.Connection con)
                    throws java.lang.Exception
Throws:
java.lang.Exception

Ontimize Document Management