|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tigris.scarab.tools.ScarabGlobalTool
This scope is an object that is made available as a global object within the system. This object must be thread safe as multiple requests may access it at the same time. The object is made available in the context as: $scarabG
The design goals of the Scarab*API is to enable a pull based methodology to be implemented.
| Constructor Summary | |
ScarabGlobalTool()
Constructor does initialization stuff |
|
| Method Summary | |
java.util.Date |
addApproxOneHour(java.util.Date date)
|
java.lang.String |
getActivityTypeLabelResource(java.lang.String code)
Remap Activity code to resource id. |
java.util.List |
getAllAttributes()
Gets a List of all of the data (non-user) Attribute objects. |
java.util.List |
getAllAttributes(java.lang.String attributeType,
boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of the data (non-user) Attribute objects. |
java.util.List |
getAllAttributes(java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of the data (non-user) Attribute objects. |
java.util.List |
getAllIssueTypes()
|
java.util.List |
getAllIssueTypes(boolean deleted)
gets a list of all Issue Types |
java.util.List |
getAllIssueTypes(boolean deleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of the Attribute objects. |
java.util.List |
getAllNotificationTypeCodes()
Get the list of available activityType codes. |
java.util.List |
getAllPermissions()
Returns a list of all the permissions in use by scarab. |
java.util.List |
getAttributes(java.lang.String attributeType)
Gets a List of all of the Attribute objects by type. |
java.util.List |
getAttributes(java.lang.String attributeType,
boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of user Attribute objects. |
java.lang.String |
getBuildVersion()
returns Scarab's build version. |
int |
getCALENDAR_DAY_FIELD()
|
int |
getCALENDAR_HOUR_FIELD()
|
int |
getCALENDAR_MONTH_FIELD()
|
int |
getCALENDAR_YEAR_FIELD()
|
SkipFiltering |
getCommentText(java.lang.String text,
ScarabLink link,
Module currentModule)
|
org.apache.velocity.app.FieldMethodizer |
getConstant()
holds the Scarab constants. it will be available to the template system as $scarabG.Constant.CONSTANT_NAME. |
java.util.List |
getCustomization(java.lang.Object moduleId,
java.lang.Object userId,
java.lang.Object activityCode)
Return the list of available NotificationFilters for the given user in the given module |
int |
getInt(java.lang.Object obj)
Returns an int representation of the given
Object whose toString method should be a valid integer.
|
MITListManager |
getMITListManager()
|
static int |
getModuleCodeLength()
|
static int |
getModuleCodeLengthPadded()
|
java.util.List |
getModulesFromIssueList(java.util.List issues)
Create a list of Modules from the given list of issues. |
static NotificationFilter |
getNotificationFilter(java.lang.Integer moduleId,
java.lang.Integer userId,
java.lang.String activityCode)
|
java.util.Date |
getNow()
Get a new Date object initialized to the current time. |
GlobalParameterManager |
getParameter()
|
org.apache.velocity.app.FieldMethodizer |
getParameterName()
holds the names of parameters that are configurable through the ui. |
org.apache.velocity.app.FieldMethodizer |
getPermission()
holds the Scarab permission constants. |
int |
getPublicModulesDisplayCount()
Provides the maximum number of public modules to be shown on the login screen. the number is stored in the property scarab.public.modules.display.count If no number is specified, this method returns -1 |
java.util.List |
getSearchUsers(java.lang.String searchField,
java.lang.String searchCriteria)
Returns a List of users based on the given search criteria. |
java.util.List |
getSearchUsers(java.lang.String searchField,
java.lang.String searchCriteria,
java.lang.String orderByField,
java.lang.String ascOrDesc)
Describe getSearchUsers method here. |
java.lang.String |
getSiteLogo()
Provides the site logo for the top banner. |
java.lang.String |
getSiteName()
Provides the site name for the top banner. |
org.apache.commons.configuration.Configuration |
getTurbineConfiguration()
|
java.util.List |
getUserAttributes()
Gets a List of all of user Attributes. |
java.util.List |
getUserAttributes(boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of the Attribute objects. |
java.util.List |
getUserAttributes(java.lang.String sortColumn,
java.lang.String sortPolarity)
Gets a List of all of the Attribute objects. |
static Workflow |
getWorkflow()
Makes the workflow tool accessible. |
void |
init(java.lang.Object data)
|
boolean |
isString(java.lang.Object obj)
|
java.util.List |
linkIssueIds(Module module,
java.lang.String text)
|
void |
log(java.lang.String s)
Logs a message at the debug level. |
void |
log(java.lang.String category,
java.lang.String s)
Logs a message at the debug level. |
void |
print(java.lang.String s)
Prints a message to standard out. |
void |
refresh()
|
java.lang.String |
replace(java.lang.String text,
java.lang.String a,
java.lang.String b)
|
java.util.List |
reverse(java.util.List a)
Creates a new List with elements reversed from the
given List. |
java.lang.Object[] |
reverse(java.lang.Object[] a)
Creates a new array with elements reversed from the given array. |
int |
sizeOfArray(java.lang.Object[] obj)
Velocity has no way of getting the size of an Object[]
easily. |
java.util.List |
subset(java.util.List a,
java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Creates a view of the portion of the given List between the specified fromIndex, inclusive, and
toIndex, exclusive.
|
java.lang.Object[] |
subset(java.lang.Object[] a,
java.lang.Integer fromIndex,
java.lang.Integer toIndex)
Creates a new array with a view of the portion of the given array between the specified fromIndex, inclusive, and toIndex, exclusive |
boolean |
templateExists(java.lang.String template)
Delegates to Velocity's templateExists() method. |
SkipFiltering |
textToHTML(java.lang.String text,
ScarabLink link,
Module currentModule)
Converts a text string to HTML by: replacing reserved characters with equivalent HTML entities adding hyperlinks for URLs adding hyperlinks for issue references |
java.util.Enumeration |
tokenize(java.lang.String text,
java.lang.String delimiters)
Breaks text into a list of Strings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScarabGlobalTool()
| Method Detail |
public void init(java.lang.Object data)
init in interface org.apache.turbine.services.pull.ApplicationToolpublic void refresh()
refresh in interface org.apache.turbine.services.pull.ApplicationToolpublic java.lang.String getBuildVersion()
public org.apache.velocity.app.FieldMethodizer getConstant()
public org.apache.velocity.app.FieldMethodizer getPermission()
public org.apache.velocity.app.FieldMethodizer getParameterName()
public java.lang.String replace(java.lang.String text,
java.lang.String a,
java.lang.String b)
public GlobalParameterManager getParameter()
public java.util.List getAllPermissions()
List of Strings
public java.util.List getAllAttributes()
throws java.lang.Exception
java.lang.Exception
public java.util.List getAttributes(java.lang.String attributeType)
throws java.lang.Exception
java.lang.Exception
public java.util.List getAllAttributes(java.lang.String attributeType,
boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exception
public java.util.List getAllAttributes(java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exception
public java.util.List getUserAttributes()
throws java.lang.Exception
java.lang.Exception
public java.util.List getUserAttributes(java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exception
public java.util.List getUserAttributes(boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exception
public java.util.List getAttributes(java.lang.String attributeType,
boolean includeDeleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exception
public java.util.List getAllIssueTypes()
throws java.lang.Exception
java.lang.Exception
public java.util.List getAllIssueTypes(boolean deleted)
throws java.lang.Exception
java.lang.Exception
public java.util.List getAllIssueTypes(boolean deleted,
java.lang.String sortColumn,
java.lang.String sortPolarity)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List getAllNotificationTypeCodes()
public java.lang.String getActivityTypeLabelResource(java.lang.String code)
code -
public java.util.List getCustomization(java.lang.Object moduleId,
java.lang.Object userId,
java.lang.Object activityCode)
throws org.apache.torque.TorqueException
moduleId - userId - activityCode -
org.apache.torque.TorqueException
public static NotificationFilter getNotificationFilter(java.lang.Integer moduleId,
java.lang.Integer userId,
java.lang.String activityCode)
throws ScarabException
ScarabException
public static Workflow getWorkflow()
throws ScarabException
ScarabException
public java.util.List getSearchUsers(java.lang.String searchField,
java.lang.String searchCriteria)
throws java.lang.Exception
searchField - the name of the database attribute to search onsearchCriteria - the search criteria to use within the LIKE command
java.lang.Exception
public java.util.List getSearchUsers(java.lang.String searchField,
java.lang.String searchCriteria,
java.lang.String orderByField,
java.lang.String ascOrDesc)
throws java.lang.Exception
getSearchUsers method here.
searchField - a String valuesearchCriteria - a String valueorderByField - a String valueascOrDesc - a String value
List value
java.lang.Exception - if an error occurs
public java.util.List getModulesFromIssueList(java.util.List issues)
throws org.apache.torque.TorqueException
org.apache.torque.TorqueExceptionpublic MITListManager getMITListManager()
public java.util.Date getNow()
Date valuepublic java.lang.Object[] reverse(java.lang.Object[] a)
a - the orginal Object[]
Object[] with values reversed from the
originalpublic java.util.List reverse(java.util.List a)
List with elements reversed from the
given List.
a - the orginal List
List with values reversed from the
original
public java.util.List subset(java.util.List a,
java.lang.Integer fromIndex,
java.lang.Integer toIndex)
List between the specified fromIndex, inclusive, and
toIndex, exclusive.
The list returned by this method is backed by the original, so changes
to either affect the other.
a - the orginal ListfromIndex - the start index of the returned subsettoIndex - the end index of the returned subset
List with a view of the original
public java.lang.Object[] subset(java.lang.Object[] a,
java.lang.Integer fromIndex,
java.lang.Integer toIndex)
a - the orginal Object[]fromIndex - the start index of the returned subsettoIndex - the end index of the returned subset
Object[] with a view of the originalpublic int sizeOfArray(java.lang.Object[] obj)
Object[]
easily. Usually this would be done by calling obj.length
but this doesn't work in Velocity.
obj - the Object[]
Object[] or -1 if obj is nullpublic boolean isString(java.lang.Object obj)
public java.util.Enumeration tokenize(java.lang.String text,
java.lang.String delimiters)
text - a String valuedelimiters - a String value
List value
public java.util.List linkIssueIds(Module module,
java.lang.String text)
public SkipFiltering getCommentText(java.lang.String text,
ScarabLink link,
Module currentModule)
public SkipFiltering textToHTML(java.lang.String text,
ScarabLink link,
Module currentModule)
Converts a text string to HTML by:
text - The text string to convert.link - currentModule - The active module.
public void log(java.lang.String s)
s - message to log
public void log(java.lang.String category,
java.lang.String s)
category - log4j Categorys - message to logpublic void print(java.lang.String s)
s - message to logpublic java.lang.String getSiteName()
public java.lang.String getSiteLogo()
public int getPublicModulesDisplayCount()
public int getInt(java.lang.Object obj)
int representation of the given
Object whose toString method should be a valid integer.
If the String cannot be parsed 0 is returned.
obj - the object
int representation of the Object
if possible or 0.public int getCALENDAR_YEAR_FIELD()
public int getCALENDAR_MONTH_FIELD()
public int getCALENDAR_DAY_FIELD()
public int getCALENDAR_HOUR_FIELD()
public java.util.Date addApproxOneHour(java.util.Date date)
public boolean templateExists(java.lang.String template)
templateExists() method.
public static int getModuleCodeLength()
public static int getModuleCodeLengthPadded()
public org.apache.commons.configuration.Configuration getTurbineConfiguration()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||