|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pyxis.greenhopper.gadget.CommonGadgetValidation
public class CommonGadgetValidation
This class contains some common validation methods that can be used in the gadget resources All UserPref parameters refer to the variable names used to store gadget data, e.g. projectId or versionId.
Field Summary | |
---|---|
static java.lang.String |
PROJECT_PREFIX
|
Constructor Summary | |
---|---|
CommonGadgetValidation(com.atlassian.jira.project.ProjectManager projectManager,
com.atlassian.jira.security.JiraAuthenticationContext authenticationContext,
com.atlassian.jira.project.version.VersionManager versionManager,
com.atlassian.jira.security.PermissionManager permissionManager,
GreenHopperLicenseManager ghLicense)
Create a new validation object. |
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
splitContextNames(java.lang.String contextNames)
Splits the context names string into an set. |
Context |
validateContext(BoardContext boardContext,
java.lang.String contextName,
java.util.Collection<ValidationError> errors,
java.lang.String contextUserPref)
This validation method is used to check that a specified context that has been chosen in the gadget user prefs exists and is a valid context |
com.atlassian.jira.project.Project |
validateForSavedProjectIdUserPref(java.util.Collection<ValidationError> errors,
java.lang.String projectIdStr,
java.lang.String projectUserPref)
Validate the project id |
boolean |
validateLicense(java.util.Collection<ValidationError> errors)
Validate the GreenHopper license |
com.atlassian.jira.project.Project |
validateProjectId(java.util.Collection<ValidationError> errors,
java.lang.String projectIdStr,
java.lang.String projectUserPref)
Validate the project id. |
Context |
validateSavedContextUserPref(BoardContext boardContext,
java.lang.String contextName,
java.util.Collection<ValidationError> errors,
java.lang.String contextUserPref)
This method can be used to validate a context specified in a gadget before the gadget is rendered. |
com.atlassian.jira.project.version.Version |
validateVersion(BoardContext boardContext,
java.lang.String versionId,
java.util.Collection<ValidationError> errors,
java.lang.String versionUserPref)
Validates a version string |
com.atlassian.jira.project.version.Version |
validateVersionForSavedPref(BoardContext boardContext,
java.lang.String versionId,
java.util.Collection<ValidationError> errors,
java.lang.String versionUserPref)
Validates a version string for a saved preference |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROJECT_PREFIX
Constructor Detail |
---|
public CommonGadgetValidation(com.atlassian.jira.project.ProjectManager projectManager, com.atlassian.jira.security.JiraAuthenticationContext authenticationContext, com.atlassian.jira.project.version.VersionManager versionManager, com.atlassian.jira.security.PermissionManager permissionManager, GreenHopperLicenseManager ghLicense)
Method Detail |
---|
public boolean validateLicense(java.util.Collection<ValidationError> errors)
errors
-
public com.atlassian.jira.project.Project validateProjectId(java.util.Collection<ValidationError> errors, java.lang.String projectIdStr, java.lang.String projectUserPref)
public com.atlassian.jira.project.Project validateForSavedProjectIdUserPref(java.util.Collection<ValidationError> errors, java.lang.String projectIdStr, java.lang.String projectUserPref)
errors
- projectIdStr
- projectUserPref
-
public com.atlassian.jira.project.version.Version validateVersion(BoardContext boardContext, java.lang.String versionId, java.util.Collection<ValidationError> errors, java.lang.String versionUserPref)
boardContext
- versionId
- errors
- versionUserPref
-
public com.atlassian.jira.project.version.Version validateVersionForSavedPref(BoardContext boardContext, java.lang.String versionId, java.util.Collection<ValidationError> errors, java.lang.String versionUserPref)
boardContext
- versionId
- errors
- versionUserPref
-
public Context validateSavedContextUserPref(BoardContext boardContext, java.lang.String contextName, java.util.Collection<ValidationError> errors, java.lang.String contextUserPref)
boardContext
- - the boardContext of the project for the context being checkedcontextName
- - the name of the context being validatederrors
- - Collection where errors will be loggedcontextUserPref
- - the user pref which stores the context user pref in the gadgetpublic Context validateContext(BoardContext boardContext, java.lang.String contextName, java.util.Collection<ValidationError> errors, java.lang.String contextUserPref)
boardContext
- - the boardContext of the project for the context being checkedcontextName
- - the name of the context being validatederrors
- - Collection where errors will be loggedcontextUserPref
- - the user pref which stores the context user pref in the gadgetpublic java.util.Set<java.lang.String> splitContextNames(java.lang.String contextNames)
contextNames
- context names separated by pipes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |