com.ptc.windchill.uwgm.common.folder
Class FolderContent

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.folder.FolderContent

public class FolderContent
extends Object

Helper class to work with the Folder content

supports ProjectLink shared objects and folders

does not support fake folders


Field Summary
private static int AVERAGE_FOLDER_SIZE
           
private  Folder folder
           
private  Class[] iterCl
           
private static Log log
           
 
Constructor Summary
FolderContent(Folder folder)
          constructor
 
Method Summary
private  void addIteration(Iterated iter, boolean allIterations, Map itersMap)
           
private  void addSharedIterations(WTCollection shared, boolean allIterations, Map itersMap)
           
 Iterated[] getAllIterations()
          returns an array of all Iteratable objects from iterCl[] presented in folder
private  void getIterations(Class iterCl, ConfigSpec cs, Map itersMap)
           
 Iterated[] getIterations(ConfigSpec[] cs)
          returns an array of filtered by config spec iteratable objects from iterCl[] presented in folder cs ConfigSpec[]
 Folder[] getSubFolders()
          returns an array of subFolders (including shared for ProjectLink)
 void setContentIterationClasses(Class[] iterCl)
          set content object classes to include to FolderContent
private  void tracePrint(String msg, Object[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

folder

private final Folder folder

iterCl

private Class[] iterCl

log

private static Log log

AVERAGE_FOLDER_SIZE

private static int AVERAGE_FOLDER_SIZE
Constructor Detail

FolderContent

public FolderContent(Folder folder)
constructor

Parameters:
folder - Folder
Method Detail

setContentIterationClasses

public void setContentIterationClasses(Class[] iterCl)
set content object classes to include to FolderContent


getSubFolders

public Folder[] getSubFolders()
                       throws WTException
returns an array of subFolders (including shared for ProjectLink)

Returns:
Folder[]
Throws:
WTException

getAllIterations

public Iterated[] getAllIterations()
                            throws WTException
returns an array of all Iteratable objects from iterCl[] presented in folder

Returns:
Iterated[]
Throws:
WTException

getIterations

public Iterated[] getIterations(ConfigSpec[] cs)
                         throws WTException
returns an array of filtered by config spec iteratable objects from iterCl[] presented in folder cs ConfigSpec[]

Returns:
Iterated[]
Throws:
WTException

getIterations

private void getIterations(Class iterCl,
                           ConfigSpec cs,
                           Map itersMap)
                    throws WTException
Throws:
WTException

addSharedIterations

private void addSharedIterations(WTCollection shared,
                                 boolean allIterations,
                                 Map itersMap)
                          throws WTException
Throws:
WTException

addIteration

private void addIteration(Iterated iter,
                          boolean allIterations,
                          Map itersMap)

tracePrint

private void tracePrint(String msg,
                        Object[] array)