com.ptc.windchill.cadx.common.util
Class FolderUtilities

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.util.FolderUtilities

public class FolderUtilities
extends Object


Field Summary
static int LIBRARY
           
static String PDMLINK_BUSINESS_DOMAIN_ROOT
           
static String PDMLINK_PRODUCTS_ALIAS_VALUE
           
static String PDMLINK_REPOSITORIES_ALIAS_VALUE
           
static int PRODUCT
           
static int PRODUCT_AND_LIBRARY
           
private static boolean VERBOSE
           
 
Constructor Summary
FolderUtilities()
           
 
Method Summary
static Folder createWorkspaceFolder(WTPrincipal principal, String name)
          Create a sub-folder with the specified name underneath the personal cabinet of the specified principal.
static boolean doesCabinetExist(String cabinetName)
          Deprecated. Use doesCabinetExist(String cabinetName, WTContainer container) otherwise cabinet will be checked in the default (ClassicContainer) context only.
static boolean doesCabinetExist(String cabinetName, WTContainer container)
          This method checks whether the a Cabinet exists for the specified cabinet name & specified container.
static boolean doesFolderExist(String folderPath)
          For the specified folder path, check if the folder exists.
static boolean doesFolderExist(String folderPath, WTContainer container)
          This method checks whether the Folder of the specified folder path exists in the specified container.
static Cabinet getCabinet(String cabinetName)
          Deprecated. Use getCabinet(String cabinetName, WTContainer container) instead
static Cabinet getCabinet(String cabinetName, WTContainer container)
          For the specified cabinet name & specified container, return back the Cabinet object.
static QueryResult getCabinetsForChildDomains(String domainRoot)
          Deprecated. No more applicable with containerization of PDMLink
static QueryResult getEligibleCabinetsByType(int typeToReturn)
          For the specified domain root and principle user return the QueryResult of the Cabinet objects for the domains of the specified typeToReturn.
static QueryResult getEligibleProductCabinets()
          For the principle user return the QueryResult of the Cabinet objects for the PDMLink Products.
static QueryResult getEligibleProductOrRepositoryCabinets()
          For the principle user return the QueryResult of the default (for business objects) Cabinet objects for PDMLink products and libraries.
static QueryResult getEligibleRepositoryCabinets()
          For the principle user return the QueryResult of the Cabinet objects for the PDMLink libraries.
static Folder getFolder(String folderPath, WTContainer container)
          Return back the Folder for the specified folder path in the specified container.
static PDMLinkHelperIfc getPDMLinkHelper()
          Deprecated. PDMLinkHelperIfc is no more applicable after containerization of PDMLink. The class which implements this interface has been deleted in the PDMLink solution.
static boolean isEligibleCabinet(Cabinet cabinet, int typeToReturn)
          Returns true if the cabinet is a default PDMLink cabinet of the specified value for PDMLink typeToReturn.
static boolean isEligibleCabinet(String cabinetName, int typeToReturn)
          Deprecated. Use isEligibleCabinet(Cabinet cabinet, int typeToReturn)instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.
static boolean isEligibleProductCabinet(Cabinet cabinet)
          Returns true if the cabinet is a PDMLink Product's default cabinet.
static boolean isEligibleProductCabinet(String cabinetName)
          Deprecated. Use isEligibleProductCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.
static boolean isEligibleProductOrRepositoryCabinet(Cabinet cabinet)
          Returns true if the cabinet is a PDMLink Product or Library's default cabinet.
static boolean isEligibleProductOrRepositoryCabinet(String cabinetName)
          Deprecated. Use isEligibleProductOrRepositoryCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.
static boolean isEligibleRepositoryCabinet(Cabinet cabinet)
          Returns true if the cabinet is a PDMLink Library's default cabinet.
static boolean isEligibleRepositoryCabinet(String cabinetName)
          Deprecated. Use isEligibleRepositoryCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDMLINK_BUSINESS_DOMAIN_ROOT

public static final String PDMLINK_BUSINESS_DOMAIN_ROOT
See Also:
Constant Field Values

PDMLINK_PRODUCTS_ALIAS_VALUE

public static final String PDMLINK_PRODUCTS_ALIAS_VALUE
See Also:
Constant Field Values

PDMLINK_REPOSITORIES_ALIAS_VALUE

public static final String PDMLINK_REPOSITORIES_ALIAS_VALUE
See Also:
Constant Field Values

PRODUCT

public static final int PRODUCT
See Also:
Constant Field Values

LIBRARY

public static final int LIBRARY
See Also:
Constant Field Values

PRODUCT_AND_LIBRARY

public static final int PRODUCT_AND_LIBRARY
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE
Constructor Detail

FolderUtilities

public FolderUtilities()
Method Detail

doesFolderExist

public static boolean doesFolderExist(String folderPath)
                               throws WTException
For the specified folder path, check if the folder exists.

Throws:
WTException

doesFolderExist

public static boolean doesFolderExist(String folderPath,
                                      WTContainer container)
                               throws WTException
This method checks whether the Folder of the specified folder path exists in the specified container. The Folder can be a Cabinet path (/ or SubFolder path (/).

Parameters:
folderPath - The folder path of the folder that is to be checked for existence
container - The container object
Returns:
boolean
Throws:
WTException

doesCabinetExist

public static boolean doesCabinetExist(String cabinetName)
                                throws WTException
Deprecated. Use doesCabinetExist(String cabinetName, WTContainer container) otherwise cabinet will be checked in the default (ClassicContainer) context only.

This method checks whether the a Cabinet exists for the cabinet name specified.

Parameters:
cabinetName - The cabinet name of the Cabinet that is to be checked for existence
Returns:
boolean
Throws:
WTException

doesCabinetExist

public static boolean doesCabinetExist(String cabinetName,
                                       WTContainer container)
                                throws WTException
This method checks whether the a Cabinet exists for the specified cabinet name & specified container.

Parameters:
cabinetName - The cabinet name of the Cabinet that is to be checked for existence
container - The WTContainer object where this cabinet's existence is to be checked
Returns:
boolean
Throws:
WTException

getCabinetsForChildDomains

public static QueryResult getCabinetsForChildDomains(String domainRoot)
                                              throws WTException
Deprecated. No more applicable with containerization of PDMLink

For the specified domain root, first find out the child domains. Thereafter, return the QueryResult of the Cabinet objects for these child domains.

Throws:
WTException

getEligibleProductCabinets

public static QueryResult getEligibleProductCabinets()
                                              throws WTException
For the principle user return the QueryResult of the Cabinet objects for the PDMLink Products.

Throws:
WTException

getEligibleRepositoryCabinets

public static QueryResult getEligibleRepositoryCabinets()
                                                 throws WTException
For the principle user return the QueryResult of the Cabinet objects for the PDMLink libraries.

Throws:
WTException

getEligibleProductOrRepositoryCabinets

public static QueryResult getEligibleProductOrRepositoryCabinets()
                                                          throws WTException
For the principle user return the QueryResult of the default (for business objects) Cabinet objects for PDMLink products and libraries.

Throws:
WTException

getEligibleCabinetsByType

public static QueryResult getEligibleCabinetsByType(int typeToReturn)
                                             throws WTException
For the specified domain root and principle user return the QueryResult of the Cabinet objects for the domains of the specified typeToReturn. Valid values for typeToReturn are: PRODUCT, LIBRARY, or PRODUCT_AND_LIBRARY. Template cabinets for the typeToreturn domains are not returned.

Throws:
WTException

isEligibleProductCabinet

public static boolean isEligibleProductCabinet(Cabinet cabinet)
                                        throws WTException
Returns true if the cabinet is a PDMLink Product's default cabinet.

Throws:
WTException

isEligibleProductCabinet

public static boolean isEligibleProductCabinet(String cabinetName)
                                        throws WTException
Deprecated. Use isEligibleProductCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.

Returns true if the specified cabinet name is a PDMLink Product's default cabinet.

Throws:
WTException

isEligibleRepositoryCabinet

public static boolean isEligibleRepositoryCabinet(Cabinet cabinet)
                                           throws WTException
Returns true if the cabinet is a PDMLink Library's default cabinet.

Throws:
WTException

isEligibleRepositoryCabinet

public static boolean isEligibleRepositoryCabinet(String cabinetName)
                                           throws WTException
Deprecated. Use isEligibleRepositoryCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.

Returns true if the specified cabinet name is a PDMLink Library's default cabinet.

Throws:
WTException

isEligibleProductOrRepositoryCabinet

public static boolean isEligibleProductOrRepositoryCabinet(Cabinet cabinet)
                                                    throws WTException
Returns true if the cabinet is a PDMLink Product or Library's default cabinet.

Throws:
WTException

isEligibleProductOrRepositoryCabinet

public static boolean isEligibleProductOrRepositoryCabinet(String cabinetName)
                                                    throws WTException
Deprecated. Use isEligibleProductOrRepositoryCabinet(Cabinet cabinet) instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.

Returns true if the specified cabinet name is a PDMLink Product or Library's default cabinet.

Throws:
WTException

isEligibleCabinet

public static boolean isEligibleCabinet(Cabinet cabinet,
                                        int typeToReturn)
                                 throws WTException
Returns true if the cabinet is a default PDMLink cabinet of the specified value for PDMLink typeToReturn. If the user does not have permission to access the cabinet for READ then false is returned. Valid values for typeToReturn are: PRODUCT, LIBRARY, or PRODUCT_AND_LIBRARY.

Throws:
WTException

isEligibleCabinet

public static boolean isEligibleCabinet(String cabinetName,
                                        int typeToReturn)
                                 throws WTException
Deprecated. Use isEligibleCabinet(Cabinet cabinet, int typeToReturn)instead. It is not possible to find a cabinet for the given cabinet name as cabinet name is no more unique.

Returns true if the cabinet for the specified cabinetName is a default PDMLink cabinet of the specified value for PDMLink typeToReturn. If the user does not have permission to access the cabinet for READ then false is returned. Valid values for typeToReturn are: PRODUCT, LIBRARY, or PRODUCT_AND_LIBRARY.

Throws:
WTException

getPDMLinkHelper

public static PDMLinkHelperIfc getPDMLinkHelper()
                                         throws WTException
Deprecated. PDMLinkHelperIfc is no more applicable after containerization of PDMLink. The class which implements this interface has been deleted in the PDMLink solution.

Returns the PDMLInk helper class.

Throws:
WTException

getFolder

public static Folder getFolder(String folderPath,
                               WTContainer container)
                        throws WTException
Return back the Folder for the specified folder path in the specified container. The Folder can be a Cabinet path (/ or SubFolder path (/).

Throws:
WTException

createWorkspaceFolder

public static Folder createWorkspaceFolder(WTPrincipal principal,
                                           String name)
                                    throws WTException
Create a sub-folder with the specified name underneath the personal cabinet of the specified principal. Also, create this under same container as the personal cabinet's container.

Throws:
WTException

getCabinet

public static Cabinet getCabinet(String cabinetName)
                          throws WTException
Deprecated. Use getCabinet(String cabinetName, WTContainer container) instead

For the specified cabinet name, return back the Cabinet object. As container is not specified, call the default getCabinet(). Note that this API looks for the cabinet in the Classic container, which might not be the expected behavior.

Throws:
WTException

getCabinet

public static Cabinet getCabinet(String cabinetName,
                                 WTContainer container)
                          throws WTException
For the specified cabinet name & specified container, return back the Cabinet object.

Throws:
WTException