public class OwEcmUtil extends Object
Utility functions for working with the 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
Modifier and Type | Class and Description |
---|---|
static class |
OwEcmUtil.OwParentPathInfo
Returned item from the function
getParentPathOfClass(OwObject obj_p, Collection classNames_p) |
static class |
OwEcmUtil.OwSimpleSearchClause
A simple search clause tuple.
|
Constructor and Description |
---|
OwEcmUtil() |
Modifier and Type | Method and Description |
---|---|
static OwObject |
createObjectFromString(OwMainAppContext context_p,
String strObject_p)
creates a OwObject from a string.
|
static OwObject |
createSafeSubFolder(OwMainAppContext context_p,
OwObject baseFolder_p,
String strName_p)
creates a simple subfolder using the default folder class from bootstrap
checks if folder exits already
|
static OwSearchObjectStore |
createSearchStore(String objectStoreId_p,
String objectStoreName_p)
Creates a
OwSearchObjectStore object with the given parameters. |
static OwSearchNode |
createSimpleSearchNode(int objectType_p,
OwSearchObjectStore searchObjectStore_p,
String strClassName_p,
String strResourceName_p,
String rootpath_p,
OwEcmUtil.OwSimpleSearchClause[] clauses_p,
OwFieldDefinitionProvider fielddefinitionprovider_p)
create a simple search node from a array of property values
|
static OwSearchNode |
createSimpleSearchNode(int objectType_p,
OwSearchObjectStore searchObjectStore_p,
String strClassName_p,
String strResourceName_p,
String rootpath_p,
OwEcmUtil.OwSimpleSearchClause[] clauses_p,
OwFieldDefinitionProvider fielddefinitionprovider_p,
boolean searchSubFolders_p)
create a simple search node from a array of property values
|
static OwSearchNode |
createSimpleSearchNode(int objectType_p,
String strClassName_p,
String strResourceName_p,
String rootpath_p,
OwEcmUtil.OwSimpleSearchClause[] clauses_p,
OwFieldDefinitionProvider fielddefinitionprovider_p)
create a simple search node from a array of property values
|
static OwSearchNode |
createSimpleSearchNode(String strClassName_p,
String strResourceName_p,
String rootpath_p,
OwEcmUtil.OwSimpleSearchClause[] clauses_p,
OwFieldDefinitionProvider fielddefinitionprovider_p)
create a simple search node from a array of property values
|
static OwObjectCollection |
doSimpleSearch(String strClassName_p,
String strResourceName_p,
String rootpath_p,
OwEcmUtil.OwSimpleSearchClause[] clauses_p,
OwRepository repository_p,
OwSort sort_p,
Collection propertynames_p,
int iMaxSize_p,
int iVersionSelection_p)
perform a simple search from a array of property values
|
static List |
getParentPathOfClass(OwObject obj_p,
Collection classNames_p)
get a collection of parents with paths for an object, which are of the specified classname
used to find the records a object is filed in
NOTE: The function will not just search the next parents, but the whole path of parents.
|
public static OwSearchNode createSimpleSearchNode(String strClassName_p, String strResourceName_p, String rootpath_p, OwEcmUtil.OwSimpleSearchClause[] clauses_p, OwFieldDefinitionProvider fielddefinitionprovider_p) throws Exception
strClassName_p
- the objectclass to search forstrResourceName_p
- the resource to search in, can be null to search the default resourcerootpath_p
- the root path to search in, can be null to search all object'sclauses_p
- an array of values operators and criteria names to apply to the searchfielddefinitionprovider_p
- the field definition provider to resolve the propertiesException
public static OwSearchNode createSimpleSearchNode(int objectType_p, String strClassName_p, String strResourceName_p, String rootpath_p, OwEcmUtil.OwSimpleSearchClause[] clauses_p, OwFieldDefinitionProvider fielddefinitionprovider_p) throws Exception
strClassName_p
- the object class to search forstrResourceName_p
- the resource to search in, can be null to search the default resourcerootpath_p
- the root path to search in, can be null to search all object'sclauses_p
- an array of values operators and criteria names to apply to the searchfielddefinitionprovider_p
- the field definition provider to resolve the propertiesobjectType_p
- - object type, as defined in OwObjectReference
class.Exception
public static OwSearchNode createSimpleSearchNode(int objectType_p, OwSearchObjectStore searchObjectStore_p, String strClassName_p, String strResourceName_p, String rootpath_p, OwEcmUtil.OwSimpleSearchClause[] clauses_p, OwFieldDefinitionProvider fielddefinitionprovider_p) throws Exception
searchObjectStore_p
- - the search object store.strClassName_p
- the object class to search forstrResourceName_p
- the resource to search in, can be null to search the default resourcerootpath_p
- the root path to search in, can be null to search all object'sclauses_p
- an array of values operators and criteria names to apply to the searchfielddefinitionprovider_p
- the field definition provider to resolve the propertiesobjectType_p
- - object type, as defined in OwObjectReference
class.Exception
public static OwSearchNode createSimpleSearchNode(int objectType_p, OwSearchObjectStore searchObjectStore_p, String strClassName_p, String strResourceName_p, String rootpath_p, OwEcmUtil.OwSimpleSearchClause[] clauses_p, OwFieldDefinitionProvider fielddefinitionprovider_p, boolean searchSubFolders_p) throws Exception
searchObjectStore_p
- - the search object store.strClassName_p
- the object class to search forstrResourceName_p
- the resource to search in, can be null to search the default resourcerootpath_p
- the root path to search in, can be null to search all object'sclauses_p
- an array of values operators and criteria names to apply to the searchfielddefinitionprovider_p
- the field definition provider to resolve the propertiesobjectType_p
- - object type, as defined in OwObjectReference
class.searchSubFolders_p
- - if true
the subfolders are included in search pathException
public static OwSearchObjectStore createSearchStore(String objectStoreId_p, String objectStoreName_p)
OwSearchObjectStore
object with the given parameters.objectStoreName_p
- - the name of object store.objectStoreId_p
- - the id of object store.OwSearchObjectStore
object.public static OwObjectCollection doSimpleSearch(String strClassName_p, String strResourceName_p, String rootpath_p, OwEcmUtil.OwSimpleSearchClause[] clauses_p, OwRepository repository_p, OwSort sort_p, Collection propertynames_p, int iMaxSize_p, int iVersionSelection_p) throws Exception
strClassName_p
- the object class to search forstrResourceName_p
- the resource to search in, can be null to search the default resourcerootpath_p
- the root path to search in, can be null to search all object'sclauses_p
- an array of values operators and criteria names to apply to the searchrepository_p
- OwRepository the repository to search insort_p
- the sort to apply, can be nullpropertynames_p
- the column properties to retrieve, can be nulliMaxSize_p
- the max size of returned objectsiVersionSelection_p
- int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_... or (OwSearchTemplate.VERSION_SELECT_DEFAULT or 0) to use default versionException
public static OwObject createObjectFromString(OwMainAppContext context_p, String strObject_p) throws Exception
Exception
public static OwObject createSafeSubFolder(OwMainAppContext context_p, OwObject baseFolder_p, String strName_p) throws Exception
context_p
- OwMainAppContext instancebaseFolder_p
- OwObject where subfolder should be createdstrName_p
- String name of new subfolderException
public static List getParentPathOfClass(OwObject obj_p, Collection classNames_p) throws Exception
obj_p
- to find parents forclassNames_p
- Collection of classnames which must match the parentsException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.