|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.netmarkets.projectResource.NmProjResourceHelper
Helper class for project resources.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
Constructor Summary | |
NmProjResourceHelper()
|
Method Summary | |
static NmProjectResource |
createNmProjectResource(ProjectResource resource)
Returns a netmarkets object corresponding to a given project resource. |
static String |
getCostPerUse(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the cost per use of the resource wt.projmgmt.util.Currency . |
static NmNumber |
getCostPerUseNmNumber(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the cost per use of the resource wt.projmgmt.util.Currency . |
static Currency |
getCurrency(Hashtable params,
String key,
Locale locale)
Extracts the currency value associated with a given key in a Hashtable. |
static CurrencyRate |
getCurrencyRate(Hashtable params,
String key,
Locale locale)
Extracts the currency rate object associated with a given key in a Hashtable. |
private static ObjectIdentifier |
getId(Object obj)
|
private static Object |
getInfoValue(ProjectResource resource,
Locale locale)
|
static int |
getMaximumUtilization(ProjectResource resource)
Get the maximum number of units of the resource that can be used. |
static String |
getMaximumUtilization(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the percent utilization of the resource wt.projmgmt.util.CurrencyRate . |
static NmNumber |
getMaximumUtilizationNmNumber(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the percent utilization of the resource wt.projmgmt.util.CurrencyRate . |
static String |
getOvertimeRate(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the overtime rate of the resource wt.projmgmt.util.CurrencyRate . |
static NmNumber |
getOvertimeRateNmNumber(ProjectResource resource,
Locale locale,
String default_value)
|
private static Object |
getPersonValue(ProjectResource resource,
Locale locale)
|
static ProjectResource |
getProjectResource(ProjectPlan plan,
ResourceType type)
Returns a project resource of a given type in the plan passed as argument. |
private static String |
getResourceLabel(ProjectResource resource,
Locale locale)
|
static Object |
getResourceLabel(ProjectResource resource,
Locale locale,
Object default_value)
Returns a localized string contained the specific entity to which the resource is associated. |
static Object |
getResourceOrganization(ProjectResource resource,
Locale locale,
Object default_value)
Returns the name of the Organization to which the resource is associated. |
private static String |
getResourceType(ProjectResource resource)
Resturns the resource type string for the resource passed as argument. |
static String |
getResourceTypeView(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the type of the resource ResourceType . |
private static String |
getRoleValue(ProjectResource resource)
|
private static String |
getRoleValueView(ProjectResource resource,
Locale locale)
|
static String |
getStandardRate(ProjectResource resource,
Locale locale,
String default_value)
Returns a localized string contained the standard rate of the resource wt.projmgmt.util.CurrencyRate . |
static NmNumber |
getStandardRateNmNumber(ProjectResource resource,
Locale locale,
String default_value)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(NmProjResourceHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
Constructor Detail |
public NmProjResourceHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(NmProjResourceHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static String getResourceTypeView(ProjectResource resource, Locale locale, String default_value)
ResourceType
. If the value is null, the default
value passed as argument is returned.
resource
- locale
- default_value
-
public static Object getResourceLabel(ProjectResource resource, Locale locale, Object default_value) throws WTException
Role
or a material label. If the value is null, the default
value passed as argument is returned.
resource
- locale
- default_value
-
WTException
public static String getStandardRate(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.CurrencyRate
. If the value is null, the
default value passed as argument is returned
resource
- locale
- default_value
-
public static String getCostPerUse(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.Currency
. If the value is null, the default
value passed as argument is returned.
resource
- locale
- default_value
-
public static String getMaximumUtilization(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.CurrencyRate
. If the value is null,
the default value passed as argument is returned
resource
- locale
- default_value
-
public static int getMaximumUtilization(ProjectResource resource)
For TimeResource
s this returns the maxPercentUtilization
.
For MaterialResource
s this returns the
maxUnits
. For any other resource types this method returns
0
.
Supported API: false
resource
-
public static String getOvertimeRate(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.CurrencyRate
. If the value is null, the
default value passed as argument is returned.
resource
- locale
- default_value
-
public static Currency getCurrency(Hashtable params, String key, Locale locale) throws WTException
params
- key
- locale
-
WTException
wt.projmgmt.util.Currency
public static CurrencyRate getCurrencyRate(Hashtable params, String key, Locale locale) throws WTException
params
- key
- locale
-
WTException
wt.projmgmt.util.CurrencyRate
public static ProjectResource getProjectResource(ProjectPlan plan, ResourceType type) throws WTException
plan
- type
-
WTException
public static NmProjectResource createNmProjectResource(ProjectResource resource) throws WTException
resource
-
WTException
public static Object getResourceOrganization(ProjectResource resource, Locale locale, Object default_value) throws WTException
resource
- locale
- default_value
-
WTException
private static ObjectIdentifier getId(Object obj)
private static Object getPersonValue(ProjectResource resource, Locale locale) throws WTException
WTException
private static String getRoleValue(ProjectResource resource) throws WTException
WTException
private static String getRoleValueView(ProjectResource resource, Locale locale) throws WTException
WTException
private static Object getInfoValue(ProjectResource resource, Locale locale) throws WTException
WTException
private static String getResourceLabel(ProjectResource resource, Locale locale) throws WTException
WTException
private static String getResourceType(ProjectResource resource)
resource
-
public static NmNumber getStandardRateNmNumber(ProjectResource resource, Locale locale, String default_value)
public static NmNumber getCostPerUseNmNumber(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.Currency
. If the value is null, the default
value passed as argument is returned.
resource
- locale
- default_value
-
public static NmNumber getMaximumUtilizationNmNumber(ProjectResource resource, Locale locale, String default_value)
wt.projmgmt.util.CurrencyRate
. If the value is null,
the default value passed as argument is returned
resource
- locale
- default_value
-
public static NmNumber getOvertimeRateNmNumber(ProjectResource resource, Locale locale, String default_value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |