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

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

public class FakeFolder
extends Object

FakeFolder represent Top level "fake" folders and some other virtual locations


Field Summary
static String CLASSNAME
          class name
private  ContainerType containerType
          associated container type or null
private static String FOLDER_RB
          resource bundle
private  int id
          internal folder ID
private  String internalName
          internal folder name
private  String l10nCode
          lolization code
static FakeFolder LIBRARIES
          fake top level subfolder to represent PDMLink Libraries
private static Log log
          logging
private static Map oidFolderMap
          mapping between FakeFolder ObjectIdentifier and FakeFolder object
static FakeFolder ORGANIZATION
          fake top level subfolder to represent Organizations
static FakeFolder PRODUCTS
          fake top level subfolder to represent PDMLink Products
static FakeFolder PROJECTS
          fake top level subfolder to represent ProjectLink Projects
static FakeFolder ROOT
          fake folder to represent a ROOT ("/") folder
static FakeFolder SECURED_LOCATION
          fake folder to represent a secured location (user is not authorized to access the folder
static FakeFolder SITE
          fake top level subfolder to represent Site
static FakeFolder WINDCHILL_PDM
          fake top level subfolder to represent Windchill PDM container (Classic)
static FakeFolder WORKSPACES
          fake top level subfolder to represent Workspaces
 
Constructor Summary
private FakeFolder(int id, String internalName, String l10nCode, ContainerType containerType)
          private internal constructor
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
static FakeFolder findByName(String localizedName, Locale locale)
          finds FakeFolder by it's localized name
 ContainerType getContainerType()
          returns associated ContainerType or null if n/a
static FakeFolder getFakeFolder(ObjectIdentifier oid)
          returns FakeFolder by Fake ObjectIdentifier
 String getLocalizedName(Locale locale)
          returns localized fake folder name to show in UI
 ObjectIdentifier getObjectIdentifier()
          returns fake ObjectIdentifier for FakeFolder
 String getObjectIdentifierAsString()
          returns FakeFolder ObjectIdentifier as String
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SECURED_LOCATION

public static final FakeFolder SECURED_LOCATION
fake folder to represent a secured location (user is not authorized to access the folder


ROOT

public static final FakeFolder ROOT
fake folder to represent a ROOT ("/") folder


WORKSPACES

public static final FakeFolder WORKSPACES
fake top level subfolder to represent Workspaces


SITE

public static final FakeFolder SITE
fake top level subfolder to represent Site


ORGANIZATION

public static final FakeFolder ORGANIZATION
fake top level subfolder to represent Organizations


WINDCHILL_PDM

public static final FakeFolder WINDCHILL_PDM
fake top level subfolder to represent Windchill PDM container (Classic)


PROJECTS

public static final FakeFolder PROJECTS
fake top level subfolder to represent ProjectLink Projects


PRODUCTS

public static final FakeFolder PRODUCTS
fake top level subfolder to represent PDMLink Products


LIBRARIES

public static final FakeFolder LIBRARIES
fake top level subfolder to represent PDMLink Libraries


oidFolderMap

private static final Map oidFolderMap
mapping between FakeFolder ObjectIdentifier and FakeFolder object


CLASSNAME

public static final String CLASSNAME
class name


id

private final int id
internal folder ID


internalName

private final String internalName
internal folder name


l10nCode

private final String l10nCode
lolization code


containerType

private final ContainerType containerType
associated container type or null


FOLDER_RB

private static final String FOLDER_RB
resource bundle


log

private static Log log
logging

Constructor Detail

FakeFolder

private FakeFolder(int id,
                   String internalName,
                   String l10nCode,
                   ContainerType containerType)
private internal constructor

Parameters:
id - int
internalName - String
Method Detail

getObjectIdentifier

public ObjectIdentifier getObjectIdentifier()
returns fake ObjectIdentifier for FakeFolder

Returns:
ObjectIdentifier
Throws:
WTException

getObjectIdentifierAsString

public String getObjectIdentifierAsString()
                                   throws WTException
returns FakeFolder ObjectIdentifier as String

Returns:
String
Throws:
WTException

getLocalizedName

public String getLocalizedName(Locale locale)
returns localized fake folder name to show in UI

Parameters:
locale - Locale
Returns:
String

getContainerType

public ContainerType getContainerType()
returns associated ContainerType or null if n/a

Returns:
ContainerType

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Returns:
a hash code value for this object.

toString

public String toString()
Returns a string representation of the object.

Returns:
a string representation of the object.

getFakeFolder

public static FakeFolder getFakeFolder(ObjectIdentifier oid)
returns FakeFolder by Fake ObjectIdentifier

Parameters:
oid - ObjectIdentifier
Returns:
FakeFolder or NULL if not found

findByName

public static FakeFolder findByName(String localizedName,
                                    Locale locale)
finds FakeFolder by it's localized name

Parameters:
localizedName - String
locale - Locale
Returns:
FakeFolder or NULL if not found