com.wewebu.ow.server.ecm
Class OwStandardSemiVirtualFolderAdapter

java.lang.Object
  extended by com.wewebu.ow.server.ecm.OwStandardSemiVirtualFolderAdapter
All Implemented Interfaces:
OwSemiVirtualFolderAdapter

public class OwStandardSemiVirtualFolderAdapter
extends Object
implements OwSemiVirtualFolderAdapter

Standard semi-virtual-folder adapter implementation.

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

Since:
3.0.0.0 class name was OwStandardSemiVrtualFolderAdapter, 3.1.0.0 class name was renamed to OwStandardSemiVirtualFolderAdapter

Field Summary
 
Fields inherited from interface com.wewebu.ow.server.ecm.OwSemiVirtualFolderAdapter
VIRTUAL_FOLDER_SEARCH_PATH_PROPERTY
 
Constructor Summary
OwStandardSemiVirtualFolderAdapter(OwNetwork network_p)
          Constructor
 
Method Summary
protected  Object convertPropertyValue(OwSearchCriteria searchCriteria_p, OwProperty folderProperty_p)
          (overridable) Convert the given property value to a value compatible with given search criteria.
 OwObjectCollection getChildren(OwSemiVirtualFolder semiVirtualFolder_p, int[] objectTypes_p, Collection propertyNames_p, OwSort sort_p, int maxSize_p, int versionSelection_p, OwSearchNode filterCriteria_p)
          Retrieves all children of the given semi-virtual-folder object.
 OwVirtualFolderObject getVirtualFolder(OwSemiVirtualFolder semiVirtualFolder_p)
          Retrieve the virtual folder object corresponding to this semi-virtual-folder adapter.
Clients of this interface should consider the possible caching of the virtual folder object instance by their adapter.
protected  Map propagateRootProperties(OwSemiVirtualFolder rootObj_p, OwSearchNode search_p)
          Called to propagate the defined set of properties from "physical" parent to it's virtual children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwStandardSemiVirtualFolderAdapter

public OwStandardSemiVirtualFolderAdapter(OwNetwork network_p)
Constructor

Parameters:
network_p -
Method Detail

getChildren

public OwObjectCollection getChildren(OwSemiVirtualFolder semiVirtualFolder_p,
                                      int[] objectTypes_p,
                                      Collection propertyNames_p,
                                      OwSort sort_p,
                                      int maxSize_p,
                                      int versionSelection_p,
                                      OwSearchNode filterCriteria_p)
                               throws OwException
Description copied from interface: OwSemiVirtualFolderAdapter
Retrieves all children of the given semi-virtual-folder object. Does NOT cache the returned object. Has similar contract with the OwObject.getChilds(int[], Collection, OwSort, int, int, OwSearchNode) method.

Specified by:
getChildren in interface OwSemiVirtualFolderAdapter
Parameters:
semiVirtualFolder_p - the semi-virtual-folder object whose children are to be retrieved
objectTypes_p - the requested object types (folder or document)
propertyNames_p - properties to fetch from DMS system along with the children, can be null.
sort_p - OwSort Sortcriteria list to sort return list
maxSize_p - int maximum number of objects to retrieve
versionSelection_p - int Selects the versions as defined in OwSearchTemplate.VERSION_SELECT_...
filterCriteria_p - optional OwSearchNode to filter the children, can be null NOTE: This parameter is an additional filter to the internal SearchTemplate used in the getSearchTemplate(...) function The internal SearchTemplate used in the getSearchTemplate(...) is used for virtual folders, the FilterCriteria_p is used to refine the result of a node
Returns:
all children of the given semi-virtual-folder object (physical included if specified by OwSemiVirtualFolder.includesPhysicalChildren())
Throws:
OwException

getVirtualFolder

public OwVirtualFolderObject getVirtualFolder(OwSemiVirtualFolder semiVirtualFolder_p)
                                       throws OwException
Description copied from interface: OwSemiVirtualFolderAdapter
Retrieve the virtual folder object corresponding to this semi-virtual-folder adapter.
Clients of this interface should consider the possible caching of the virtual folder object instance by their adapter.

Specified by:
getVirtualFolder in interface OwSemiVirtualFolderAdapter
Returns:
the virtual folder object of this semi-virtual-folder adapter
Throws:
OwException

convertPropertyValue

protected Object convertPropertyValue(OwSearchCriteria searchCriteria_p,
                                      OwProperty folderProperty_p)
                               throws Exception
(overridable) Convert the given property value to a value compatible with given search criteria. The default implementation returns the same value if java classes are the same in the property and the search criteria (see OwSearchCriteria.getJavaClassName() and OwFieldDefinition.getJavaClassName()). If the two classes don't match search a search-criteria based string conversion is performed on the properties value string representation.

Parameters:
searchCriteria_p -
folderProperty_p -
Returns:
converted Object value
Throws:
Exception

propagateRootProperties

protected Map propagateRootProperties(OwSemiVirtualFolder rootObj_p,
                                      OwSearchNode search_p)
                               throws Exception
Called to propagate the defined set of properties from "physical" parent to it's virtual children. Will either return a map of propagated properties and depending values, or an empty map if no propagation was done.

Parameters:
rootObj_p - OwSemiVirtualFolder to use for propagation
search_p - OwSearchNode where to map the properties
Returns:
Map of propagated properties and depending values.
Throws:
Exception
Since:
3.2.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.