com.wewebu.ow.server.ecmimpl.opencmis.object
Class OwCMISAbstractTransientDocumentObject<N extends org.apache.chemistry.opencmis.client.api.TransientDocument,D extends org.apache.chemistry.opencmis.client.api.DocumentType,C extends OwCMISNativeObjectClass<D,N>>

java.lang.Object
  extended by com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractObject<C>
      extended by com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractSessionObject<OwCMISNativeSession,C>
          extended by com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractNativeObject<N,D,C>
              extended by com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractTransientDocumentObject<N,D,C>
All Implemented Interfaces:
com.wewebu.ow.server.ecm.OwObject, com.wewebu.ow.server.ecm.OwObjectReference, com.wewebu.ow.server.ecm.OwVersion, OwCMISDocument<N>, OwCMISNativeObject<N>, OwCMISObject, OwCMISSessionObject, com.wewebu.ow.server.field.OwFieldProvider
Direct Known Subclasses:
OwCMISAlfrescoDocumentObject, OwCMISDocumentObject

public abstract class OwCMISAbstractTransientDocumentObject<N extends org.apache.chemistry.opencmis.client.api.TransientDocument,D extends org.apache.chemistry.opencmis.client.api.DocumentType,C extends OwCMISNativeObjectClass<D,N>>
extends OwCMISAbstractNativeObject<N,D,C>
implements OwCMISDocument<N>

OwCMISAbstractTransientDocumentObject. Base implementation for handling Documents objects, using OpenCMIS TransientDocument Client-API.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Field Summary
protected static Set<String> CONTENT_STREAM_PROPERTIES
           
protected static Set<String> VERSION_PROPERTIES
           
protected static Map<String,Object> VERSION_SERIES_PARAMETERS
           
 
Fields inherited from class com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractNativeObject
owTransientObject
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObject
STANDARD_PATH_DELIMITER
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwObjectReference
OBJECT_TYPE_ALL_CONTAINER_OBJECTS, OBJECT_TYPE_ALL_CONTENT_OBJECTS, OBJECT_TYPE_ALL_TUPLE_OBJECTS, OBJECT_TYPE_ALL_WORKFLOW_OBJECTS, OBJECT_TYPE_BPM_ROOT_FOLDER, OBJECT_TYPE_CONTAINER_USER_START, OBJECT_TYPE_CONTENT_USER_START, OBJECT_TYPE_CROSS_QUEUE_FOLDER, OBJECT_TYPE_CUSTOM, OBJECT_TYPE_DOCUMENT, OBJECT_TYPE_DYNAMIC_VIRTUAL_FOLDER, OBJECT_TYPE_ECM_ROOT_FOLDER, OBJECT_TYPE_FOLDER, OBJECT_TYPE_HISTORY, OBJECT_TYPE_LINK, OBJECT_TYPE_PROXY_QUEUE_FOLDER, OBJECT_TYPE_PUBLIC_QUEUE_FOLDER, OBJECT_TYPE_ROSTER_FOLDER, OBJECT_TYPE_ROSTERITEM, OBJECT_TYPE_STORED_SEARCH, OBJECT_TYPE_SYS_QUEUE_FOLDER, OBJECT_TYPE_TRACKER_QUEUE_FOLDER, OBJECT_TYPE_TUPLE_USER_START, OBJECT_TYPE_UNDEFINED, OBJECT_TYPE_USER_QUEUE_FOLDER, OBJECT_TYPE_VIRTUAL_FOLDER, OBJECT_TYPE_WORKFLOW_USER_START, OBJECT_TYPE_WORKITEM, OBJECT_TYPE_WORKITEM_PROXY, OBJECT_TYPE_WORKITEM_TRACKER
 
Fields inherited from interface com.wewebu.ow.server.field.OwFieldProvider
TYPE_AJAX, TYPE_CHECKIN_OBJECT, TYPE_CREATE_OBJECT, TYPE_META_OBJECT, TYPE_RESULT_LIST, TYPE_SEARCH, TYPE_SMALL
 
Constructor Summary
OwCMISAbstractTransientDocumentObject(OwCMISNativeSession session_p, N nativeObject_p, org.apache.chemistry.opencmis.client.api.OperationContext creationContext, C class_p)
           
 
Method Summary
 boolean canCancelcheckout(int context_p)
           
 void cancelcheckout()
           
 boolean canCheckin(int context_p)
           
 boolean canCheckout(int context_p)
           
 boolean canDemote(int context_p)
           
 boolean canGetContent(int iContentType_p, int iContext_p)
           
 boolean canPromote(int context_p)
           
 boolean canSave(int context_p)
           
 boolean canSetContent(int iContentType_p, int iContext_p)
           
 boolean canSetProperties(int context)
           
 void checkin(boolean promote, Object mode, String className, com.wewebu.ow.server.ecm.OwPropertyCollection properties, com.wewebu.ow.server.ecm.OwPermissionCollection permissions, com.wewebu.ow.server.ecm.OwContentCollection content, boolean overwriteContent, String mimeType, String mimeParameter)
           
protected  org.apache.chemistry.opencmis.client.api.ObjectId checkinThisVersion(boolean promote, Object mode, String className, com.wewebu.ow.server.ecm.OwPropertyCollection properties, com.wewebu.ow.server.ecm.OwPermissionCollection permissions, com.wewebu.ow.server.ecm.OwContentCollection content, boolean overwriteContent, String mimeType, String mimeParameter)
           
 void checkout(Object mode_p)
           
 OwCMISObject createCopy(OwCMISObject copyParent_p, com.wewebu.ow.server.ecm.OwPropertyCollection properties_p, com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p, int[] childTypes_p)
           
 void demote()
           
 boolean equals(com.wewebu.ow.server.ecm.OwVersion version_p)
           
 String getCheckedOutUserID(int iContext_p)
           
 com.wewebu.ow.server.ecm.OwContentCollection getContentCollection()
           
 String getMIMEType()
           
 com.wewebu.ow.server.ecm.OwObjectCollection getParents()
           
 String getPath()
           
 com.wewebu.ow.server.ecm.OwVersion getVersion()
           
 String getVersionInfo()
           
 int[] getVersionNumber()
           
 OwCMISVersionSeries getVersionSeries()
           
protected  OwCMISVersionSeries getVersionSeriesObject()
           
 boolean hasContent(int context_p)
           
 int hashCode()
           
 boolean isCheckedOut(int context_p)
           
 boolean isLatest(int context_p)
           
 boolean isMajor(int context_p)
           
 boolean isMyCheckedOut(int context_p)
           
 boolean isReleased(int context_p)
           
protected  boolean mustCreateVersionSeriesObject()
           
 void promote()
           
 void save(com.wewebu.ow.server.ecm.OwContentCollection content, String mimeType, String mimeParameter)
           
 void setContentCollection(com.wewebu.ow.server.ecm.OwContentCollection content)
           
protected  OwCMISVersionSeries toVersionSeries()
           
 
Methods inherited from class com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractNativeObject
afterPropertiesSet, canDelete, delete, detach, getChilds, getDMSID, getID, getName, getNativeObject, getPermissions, getProperties, getProperty, getRelationDirection, getRelationTypeFilter, getTransientObject, hasChilds, refreshProperties, refreshProperties, reloadNativeObject, replaceNativeObject, replaceNativeObject, replaceNativeObject, setPermissions, setProperties
 
Methods inherited from class com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractSessionObject
canGetPermissions, canSetPermissions, createCopyProperties, getResource, getSession
 
Methods inherited from class com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISAbstractObject
add, canAdd, canChangeClass, canFilterChilds, canGetProperties, canLock, canMove, canRemoveReference, changeClass, checkPropertyCollection, equals, getChildCount, getClassName, getClonedPermissions, getClonedProperties, getColumnInfoList, getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getFilterProperties, getInstance, getLock, getLockUserID, getMIMEParameter, getMyLock, getObjectClass, getPageCount, getResourceID, getSafeFieldValue, getSearchTemplate, getType, getVirtualProperties, getVirtualProperty, hasVersionSeries, move, removeReference, setField, setLock, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISNativeObject
getNativeObject, getTransientObject
 
Methods inherited from interface com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISSessionObject
getSession
 
Methods inherited from interface com.wewebu.ow.server.ecmimpl.opencmis.object.OwCMISObject
getChildCount, getChilds, getDMSID, getObjectClass, getPermissions, getProperty, getResource, getResourceID, hasChilds, setProperties, setProperties
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwObject
add, canAdd, canChangeClass, canDelete, canFilterChilds, canGetPermissions, canGetProperties, canLock, canMove, canRemoveReference, canSetPermissions, changeClass, delete, getClassName, getClonedPermissions, getClonedProperties, getColumnInfoList, getFilterProperties, getLock, getLockUserID, getMyLock, getProperties, getSearchTemplate, hasVersionSeries, move, refreshProperties, refreshProperties, removeReference, setLock, setPermissions
 
Methods inherited from interface com.wewebu.ow.server.ecm.OwObjectReference
getID, getInstance, getMIMEParameter, getName, getPageCount, getType
 
Methods inherited from interface com.wewebu.ow.server.field.OwFieldProvider
getField, getFieldProviderName, getFieldProviderSource, getFieldProviderType, getFields, getSafeFieldValue, setField
 

Field Detail

VERSION_SERIES_PARAMETERS

protected static final Map<String,Object> VERSION_SERIES_PARAMETERS

VERSION_PROPERTIES

protected static final Set<String> VERSION_PROPERTIES

CONTENT_STREAM_PROPERTIES

protected static final Set<String> CONTENT_STREAM_PROPERTIES
Constructor Detail

OwCMISAbstractTransientDocumentObject

public OwCMISAbstractTransientDocumentObject(OwCMISNativeSession session_p,
                                             N nativeObject_p,
                                             org.apache.chemistry.opencmis.client.api.OperationContext creationContext,
                                             C class_p)
                                      throws com.wewebu.ow.server.exceptions.OwException
Throws:
com.wewebu.ow.server.exceptions.OwException
Method Detail

getMIMEType

public String getMIMEType()
                   throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getMIMEType in interface com.wewebu.ow.server.ecm.OwObjectReference
Overrides:
getMIMEType in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

hasContent

public boolean hasContent(int context_p)
                   throws com.wewebu.ow.server.exceptions.OwException
Specified by:
hasContent in interface com.wewebu.ow.server.ecm.OwObjectReference
Overrides:
hasContent in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

getContentCollection

public com.wewebu.ow.server.ecm.OwContentCollection getContentCollection()
                                                                  throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getContentCollection in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getContentCollection in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

canGetContent

public boolean canGetContent(int iContentType_p,
                             int iContext_p)
                      throws Exception
Specified by:
canGetContent in interface com.wewebu.ow.server.ecm.OwObject
Throws:
Exception

setContentCollection

public void setContentCollection(com.wewebu.ow.server.ecm.OwContentCollection content)
                          throws Exception
Specified by:
setContentCollection in interface com.wewebu.ow.server.ecm.OwObject
Throws:
Exception

canSetContent

public boolean canSetContent(int iContentType_p,
                             int iContext_p)
                      throws Exception
Specified by:
canSetContent in interface com.wewebu.ow.server.ecm.OwObject
Throws:
Exception

getVersion

public com.wewebu.ow.server.ecm.OwVersion getVersion()
Specified by:
getVersion in interface com.wewebu.ow.server.ecm.OwObject

mustCreateVersionSeriesObject

protected boolean mustCreateVersionSeriesObject()

getVersionSeries

public OwCMISVersionSeries getVersionSeries()
                                     throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getVersionSeries in interface com.wewebu.ow.server.ecm.OwObject
Specified by:
getVersionSeries in interface OwCMISDocument<N extends org.apache.chemistry.opencmis.client.api.TransientDocument>
Throws:
com.wewebu.ow.server.exceptions.OwException

getVersionSeriesObject

protected OwCMISVersionSeries getVersionSeriesObject()
                                              throws com.wewebu.ow.server.exceptions.OwException
Throws:
com.wewebu.ow.server.exceptions.OwException

toVersionSeries

protected OwCMISVersionSeries toVersionSeries()
                                       throws com.wewebu.ow.server.exceptions.OwException
Throws:
com.wewebu.ow.server.exceptions.OwException

getVersionNumber

public int[] getVersionNumber()
Specified by:
getVersionNumber in interface com.wewebu.ow.server.ecm.OwVersion

getVersionInfo

public String getVersionInfo()
                      throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getVersionInfo in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

isReleased

public boolean isReleased(int context_p)
                   throws Exception
Specified by:
isReleased in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

isLatest

public boolean isLatest(int context_p)
                 throws Exception
Specified by:
isLatest in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

isMajor

public boolean isMajor(int context_p)
                throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isMajor in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

isCheckedOut

public boolean isCheckedOut(int context_p)
                     throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isCheckedOut in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

isMyCheckedOut

public boolean isMyCheckedOut(int context_p)
                       throws com.wewebu.ow.server.exceptions.OwException
Specified by:
isMyCheckedOut in interface com.wewebu.ow.server.ecm.OwVersion
Specified by:
isMyCheckedOut in interface OwCMISDocument<N extends org.apache.chemistry.opencmis.client.api.TransientDocument>
Throws:
com.wewebu.ow.server.exceptions.OwException

getCheckedOutUserID

public String getCheckedOutUserID(int iContext_p)
                           throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getCheckedOutUserID in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

equals

public boolean equals(com.wewebu.ow.server.ecm.OwVersion version_p)
               throws com.wewebu.ow.server.exceptions.OwException
Specified by:
equals in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

hashCode

public int hashCode()
Overrides:
hashCode in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>

checkout

public void checkout(Object mode_p)
              throws Exception
Specified by:
checkout in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

canCheckout

public boolean canCheckout(int context_p)
                    throws Exception
Specified by:
canCheckout in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

checkinThisVersion

protected org.apache.chemistry.opencmis.client.api.ObjectId checkinThisVersion(boolean promote,
                                                                               Object mode,
                                                                               String className,
                                                                               com.wewebu.ow.server.ecm.OwPropertyCollection properties,
                                                                               com.wewebu.ow.server.ecm.OwPermissionCollection permissions,
                                                                               com.wewebu.ow.server.ecm.OwContentCollection content,
                                                                               boolean overwriteContent,
                                                                               String mimeType,
                                                                               String mimeParameter)
                                                                        throws Exception
Throws:
Exception

checkin

public void checkin(boolean promote,
                    Object mode,
                    String className,
                    com.wewebu.ow.server.ecm.OwPropertyCollection properties,
                    com.wewebu.ow.server.ecm.OwPermissionCollection permissions,
                    com.wewebu.ow.server.ecm.OwContentCollection content,
                    boolean overwriteContent,
                    String mimeType,
                    String mimeParameter)
             throws Exception
Specified by:
checkin in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

canCheckin

public boolean canCheckin(int context_p)
                   throws Exception
Specified by:
canCheckin in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

cancelcheckout

public void cancelcheckout()
                    throws com.wewebu.ow.server.exceptions.OwException
Specified by:
cancelcheckout in interface com.wewebu.ow.server.ecm.OwVersion
Specified by:
cancelcheckout in interface OwCMISDocument<N extends org.apache.chemistry.opencmis.client.api.TransientDocument>
Throws:
com.wewebu.ow.server.exceptions.OwException

canCancelcheckout

public boolean canCancelcheckout(int context_p)
                          throws com.wewebu.ow.server.exceptions.OwException
Specified by:
canCancelcheckout in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
com.wewebu.ow.server.exceptions.OwException

canSetProperties

public boolean canSetProperties(int context)
Specified by:
canSetProperties in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
canSetProperties in class OwCMISAbstractNativeObject<N extends org.apache.chemistry.opencmis.client.api.TransientDocument,D extends org.apache.chemistry.opencmis.client.api.DocumentType,C extends OwCMISNativeObjectClass<D,N>>

promote

public void promote()
             throws Exception
Specified by:
promote in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

canPromote

public boolean canPromote(int context_p)
                   throws Exception
Specified by:
canPromote in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

demote

public void demote()
            throws Exception
Specified by:
demote in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

canDemote

public boolean canDemote(int context_p)
                  throws Exception
Specified by:
canDemote in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

save

public void save(com.wewebu.ow.server.ecm.OwContentCollection content,
                 String mimeType,
                 String mimeParameter)
          throws Exception
Specified by:
save in interface com.wewebu.ow.server.ecm.OwVersion
Throws:
Exception

canSave

public boolean canSave(int context_p)
Specified by:
canSave in interface com.wewebu.ow.server.ecm.OwVersion

getParents

public com.wewebu.ow.server.ecm.OwObjectCollection getParents()
                                                       throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getParents in interface com.wewebu.ow.server.ecm.OwObject
Overrides:
getParents in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

getPath

public String getPath()
               throws com.wewebu.ow.server.exceptions.OwException
Specified by:
getPath in interface com.wewebu.ow.server.ecm.OwObject
Specified by:
getPath in interface OwCMISObject
Overrides:
getPath in class OwCMISAbstractObject<C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException

createCopy

public OwCMISObject createCopy(OwCMISObject copyParent_p,
                               com.wewebu.ow.server.ecm.OwPropertyCollection properties_p,
                               com.wewebu.ow.server.ecm.OwPermissionCollection permissions_p,
                               int[] childTypes_p)
                        throws com.wewebu.ow.server.exceptions.OwException
Specified by:
createCopy in interface OwCMISObject
Overrides:
createCopy in class OwCMISAbstractSessionObject<OwCMISNativeSession,C extends OwCMISNativeObjectClass<D,N>>
Throws:
com.wewebu.ow.server.exceptions.OwException


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.