public class JspFunctions
extends java.lang.Object
| Constructor and Description |
|---|
JspFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
arrayContains(java.lang.String[] items,
java.lang.String item)
NOT YET DOCUMENTED
|
static java.lang.String |
decodePath(java.lang.String s)
Removes jsp-encoded xpath indexing from a string
|
static boolean |
fileExists(java.lang.String relativePath,
javax.servlet.http.HttpServletRequest request)
Test for existence of file relative to the jsp page in which the function
is called.
|
static AsnStandardsNode |
getAsnStandard(java.lang.String asnId,
CATServiceHelper helper) |
static DcsDataDocReader |
getDcsDataDocReader(DocReader docReader)
Gets the dcsDataDocReader attribute of the JspFunctions class
|
static java.lang.String |
getDcsField(java.lang.String fieldName,
DocReader docReader)
Gets the dcsField attribute of the JspFunctions class
|
static java.lang.String |
getFullName(java.lang.String username,
UserManager userManager)
Gets the fullName attribute of the JspFunctions class
|
static java.lang.String |
getLocalizedSchemaXML(java.lang.String url)
Gets the localizedSchemaXML attribute of the JspFunctions class
|
static java.lang.String |
getNamedXPath(java.lang.String pathName,
java.lang.String xmlFormat,
FrameworkRegistry reg)
Returns the xpath for the provided named schema path (pathName) as
configured for the specified framework (xmlFormat).
|
static java.util.List |
getPrompts(java.lang.String xpath,
MetaDataFramework framework)
Gets the prompts defined in the fieldFile for the current xpath and framework.
|
static java.lang.String |
getSetLabel(SetInfo setInfo)
Gets the setLabel attribute of the JspFunctions class
|
static java.lang.String |
getStatusLabel(java.lang.String rawLabel,
java.lang.String collection,
SessionBean sessionBean)
Gets the statusLabel for the specified collection, converting rawLabel to
it's human-readable form if it is a "finalStatus".
|
static boolean |
hasCollectionRole(User user,
java.lang.String role,
java.lang.String collection)
Returns true if user has specified permission for specified collectino
|
static boolean |
hasRole(User user,
java.lang.String role)
NOT YET DOCUMENTED
|
static boolean |
isAuthorized(java.lang.String operation,
SessionBean sessionBean)
Gets the authorized attribute of the JspFunctions class
|
static boolean |
isAuthorized(java.lang.String operation,
SessionBean sessionBean,
java.lang.String collection)
Gets the authorized attribute of the JspFunctions class
|
static boolean |
listContains(java.util.List items,
java.lang.String item)
NOT YET DOCUMENTED
|
static void |
main(java.lang.String[] args)
The main program for the JspFunctions class
|
static void |
prtln(java.lang.String s)
NOT YET DOCUMENTED
|
static java.lang.String |
toCommaDelimited(java.lang.Object o)
Converts either a list or a iterable to a comma-delmited string, which can
then be converted into a list for use by Javascript (and in particular
Prototype.Array),
|
static java.lang.String |
truncate(java.lang.String s,
int length)
Truncate provided string to specified length.
|
public static boolean hasRole(User user, java.lang.String role)
user - NOT YET DOCUMENTEDrole - NOT YET DOCUMENTEDpublic static boolean hasCollectionRole(User user, java.lang.String role, java.lang.String collection)
user - the user ojectrole - role represented as a string (e.g., "manager")public static boolean isAuthorized(java.lang.String operation,
SessionBean sessionBean)
operation - NOT YET DOCUMENTEDsessionBean - NOT YET DOCUMENTEDpublic static java.lang.String getNamedXPath(java.lang.String pathName,
java.lang.String xmlFormat,
FrameworkRegistry reg)
pathName - configured path name (from framework config)xmlFormat - speicified metadata framework (e.g., "adn")reg - the FrameworkRegistrypublic static boolean isAuthorized(java.lang.String operation,
SessionBean sessionBean,
java.lang.String collection)
operation - NOT YET DOCUMENTEDsessionBean - NOT YET DOCUMENTEDcollection - NOT YET DOCUMENTEDpublic static boolean fileExists(java.lang.String relativePath,
javax.servlet.http.HttpServletRequest request)
relativePath - NOT YET DOCUMENTEDrequest - NOT YET DOCUMENTEDpublic static DcsDataDocReader getDcsDataDocReader(DocReader docReader)
docReader - Description of the Parameterpublic static java.lang.String truncate(java.lang.String s,
int length)
s - string to truncatelength - truncation lengthpublic static java.lang.String getFullName(java.lang.String username,
UserManager userManager)
username - a usernameuserManager - the UserManagerpublic static java.lang.String getStatusLabel(java.lang.String rawLabel,
java.lang.String collection,
SessionBean sessionBean)
rawLabel - NOT YET DOCUMENTEDcollection - NOT YET DOCUMENTEDsessionBean - NOT YET DOCUMENTEDpublic static java.lang.String getSetLabel(SetInfo setInfo)
setInfo - NOT YET DOCUMENTEDpublic static boolean listContains(java.util.List items,
java.lang.String item)
items - NOT YET DOCUMENTEDitem - NOT YET DOCUMENTEDpublic static boolean arrayContains(java.lang.String[] items,
java.lang.String item)
items - NOT YET DOCUMENTEDitem - NOT YET DOCUMENTEDpublic static java.lang.String toCommaDelimited(java.lang.Object o)
Used when we want to convert a jsp object (List or Array) into a javascript variable.
o - NOT YET DOCUMENTEDpublic static java.lang.String getDcsField(java.lang.String fieldName,
DocReader docReader)
fieldName - Description of the ParameterdocReader - Description of the Parameterpublic static java.lang.String decodePath(java.lang.String s)
e.g., /itemRecord/foo_1_/farb_4_ becomes /itemRecord/foo/farb
s - Description of the Parameterpublic static java.lang.String getLocalizedSchemaXML(java.lang.String url)
url - NOT YET DOCUMENTEDpublic static java.util.List getPrompts(java.lang.String xpath,
MetaDataFramework framework)
xpath - xpath for promptframework - the frameworkpublic static AsnStandardsNode getAsnStandard(java.lang.String asnId, CATServiceHelper helper)
public static void main(java.lang.String[] args)
args - The command line argumentspublic static void prtln(java.lang.String s)
s - NOT YET DOCUMENTED