com.wewebu.ow.server.ecm
Interface OwVersion


public interface OwVersion

Base interface for Object versions to identify a single version of a document in a versioning system.

To be implemented with the specific ECM system.

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


Method Summary
 boolean canCancelcheckout(int context_p)
          check if cancel checkout function is allowed
 void cancelcheckout()
          cancel checkout
 boolean canCheckin(int context_p)
          check if checkin function is allowed
 boolean canCheckout(int context_p)
          check if checkout function is allowed
 boolean canDemote(int context_p)
          check if demote version function is allowed
 boolean canPromote(int context_p)
          check if promote version function is allowed
 boolean canSave(int context_p)
          check if a reservation object is available, which can be saved to
 void checkin(boolean fPromote_p, Object mode_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, boolean fOverwriteContent_p, String strMimeType_p, String strMimeParameter_p)
          checkin
 void checkout(Object mode_p)
          checkout
 void demote()
          demote version
 boolean equals(OwVersion version_p)
          check if this version is equal to the given version
 String getCheckedOutUserID(int iContext_p)
          get the user who checked out the object
 String getVersionInfo()
          get the version number as a String
 int[] getVersionNumber()
          get the version number as an array of integer.
 boolean isCheckedOut(int context_p)
          true if object is locked due to check out
 boolean isLatest(int context_p)
          check if this version is the latest version
 boolean isMajor(int context_p)
          check if this version is a major version, e.g.
 boolean isMyCheckedOut(int context_p)
          true if object is locked by the current user due to check out
 boolean isReleased(int context_p)
          check if this version is the released version
 void promote()
          promote version
 void save(OwContentCollection content_p, String strMimeType_p, String strMimeParameter_p)
          set the content to the checked out object
 

Method Detail

getVersionNumber

int[] getVersionNumber()
                       throws Exception
get the version number as an array of integer.

Returns:
int[] with version number, first index has highest priority.
Throws:
Exception

getVersionInfo

String getVersionInfo()
                      throws Exception
get the version number as a String

Returns:
String with version number, or placeholder [latest | released]
Throws:
Exception

isReleased

boolean isReleased(int context_p)
                   throws Exception
check if this version is the released version

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

isLatest

boolean isLatest(int context_p)
                 throws Exception
check if this version is the latest version

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

isMajor

boolean isMajor(int context_p)
                throws Exception
check if this version is a major version, e.g. was released once

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

isCheckedOut

boolean isCheckedOut(int context_p)
                     throws Exception
true if object is locked due to check out

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

isMyCheckedOut

boolean isMyCheckedOut(int context_p)
                       throws Exception
true if object is locked by the current user due to check out

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception
Since:
2.5.2.0

getCheckedOutUserID

String getCheckedOutUserID(int iContext_p)
                           throws Exception
get the user who checked out the object

Parameters:
iContext_p - OwStatusContextDefinitions
Returns:
the User ID of the user who checked out the item, or null if it is not checked out
Throws:
Exception
Since:
2.5.2.0

equals

boolean equals(OwVersion version_p)
               throws Exception
check if this version is equal to the given version

Parameters:
version_p - OwVersion to compare to
Throws:
Exception

checkout

void checkout(Object mode_p)
              throws Exception
checkout

Parameters:
mode_p - Object access mode for checked out object, see getCheckoutModes
Throws:
Exception

canCheckout

boolean canCheckout(int context_p)
                    throws Exception
check if checkout function is allowed

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

checkin

void checkin(boolean fPromote_p,
             Object mode_p,
             String strObjectClassName_p,
             OwPropertyCollection properties_p,
             OwPermissionCollection permissions_p,
             OwContentCollection content_p,
             boolean fOverwriteContent_p,
             String strMimeType_p,
             String strMimeParameter_p)
             throws Exception
checkin

Parameters:
fPromote_p - boolean true = create a released version right away
mode_p - Object checkin mode for objects, see getCheckinModes, or null to use default
strObjectClassName_p - requested class name of the new object
properties_p - OwPropertyCollection with new properties to set, or null to use defaults
permissions_p - OwPermissionCollection ECM specific permissions or null to use defaults
content_p - OwContentCollection the new content to set, null to create an empty object
fOverwriteContent_p - boolean true = content_p overwrites existing content, even if null, false = existing content is kept
strMimeType_p - String MIME Types of the new object content
strMimeParameter_p - extra info to the MIME type
Throws:
Exception

canCheckin

boolean canCheckin(int context_p)
                   throws Exception
check if checkin function is allowed

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

cancelcheckout

void cancelcheckout()
                    throws Exception
cancel checkout

Throws:
Exception

canCancelcheckout

boolean canCancelcheckout(int context_p)
                          throws Exception
check if cancel checkout function is allowed

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

promote

void promote()
             throws Exception
promote version

Throws:
Exception

canPromote

boolean canPromote(int context_p)
                   throws Exception
check if promote version function is allowed

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

demote

void demote()
            throws Exception
demote version

Throws:
Exception

canDemote

boolean canDemote(int context_p)
                  throws Exception
check if demote version function is allowed

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception

save

void save(OwContentCollection content_p,
          String strMimeType_p,
          String strMimeParameter_p)
          throws Exception
set the content to the checked out object

Parameters:
content_p - OwContentCollection the new content to set, null to create an empty object
strMimeType_p - String MIME Types of the new object content
strMimeParameter_p - extra info to the MIME type
Throws:
Exception

canSave

boolean canSave(int context_p)
                throws Exception
check if a reservation object is available, which can be saved to

Parameters:
context_p - OwStatusContextDefinitions
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.