public interface Helper
Modifier and Type | Method and Description |
---|---|
default int |
compareVersions(String v1,
String v2)
Compare versions using "." as a delimiter.
|
String |
fixHtml(String input)
Fix html: remove bad elements and ensure xhtml/utf-8.
|
String |
formatDate(Date date,
String format)
Format any given date.
|
ProjectRoleActors |
getActorsForProjectRole(ProjectRole projectRole)
Gets the actors for project role.
|
ApplicationProperties |
getApplicationProperties()
Gets the application properties.
|
String |
getBaseUrl()
Gets the base url.
|
Collection<ProjectComponent> |
getComponents()
Gets the components.
|
Collection<ConditionsDescriptor> |
getConditions(ActionDescriptor actionDescriptor)
Gets the conditions.
|
List<FieldConfigScheme> |
getConfigSchemesForField(CustomField field)
Gets the config schemes for field.
|
Map<String,Object> |
getContext()
Gets the context.
|
Date |
getCurrentDate() |
CustomField |
getCustomFieldObject(Long id)
Gets the custom field object by ID (eg 10000L).
|
CustomField |
getCustomFieldObject(String id)
Get a CustomField by its text key (eg 'customfield_10000').
|
List<CustomField> |
getCustomFieldObjects(Long projectId,
String issueType)
Gets the custom field objects.
|
Collection<CustomField> |
getCustomFieldObjectsByName(String customFieldName)
Retrieve custom field(s) of a certain name.
|
Long |
getDefaultSecurityLevel()
Gets the default security level.
|
Collection<EventType> |
getEventTypes()
Gets the event types.
|
Map<Long,EventType> |
getEventTypesMap()
Gets the event types map.
|
Field |
getField(String id)
Gets the field.
|
default FieldLayout |
getFieldLayoutByIssueType(@NotNull IssueType issueType)
Gets the field layout for the current project and the given issue type.
|
FieldLayout |
getFieldLayoutByIssueType(String issueTypeId)
Gets the field layout for the current project and the given issue type id.
|
@Null FieldLayoutScheme |
getFieldLayoutScheme()
Gets the field layout schemes for the current project.
|
Collection<FieldLayoutSchemeEntity> |
getFieldLayoutSchemeEntities()
Gets the field layout scheme entities for the current project.
|
@Null FieldScreen |
getFieldScreen(ActionDescriptor actionDescriptor)
Gets the field screen.
|
default Collection<FieldScreen> |
getFieldScreens(String fieldId)
Gets the field screens.
|
Collection<FieldScreenTab> |
getFieldScreenTabs(String fieldId)
Gets the field screen tabs.
|
Collection<ActionDescriptor> |
getGlobalActions(JiraWorkflow workflow)
Gets the global actions.
|
Map<String,Object> |
getGlobalContext()
Gets the global context.
|
Group |
getGroupByName(String groupname)
Gets the group by name.
|
Collection<Group> |
getGroupsOfUser(ApplicationUser user)
Gets the groups of user.
|
Collection<Group> |
getGroupsOfUser(String username)
Gets the groups of user.
|
Collection<ActionDescriptor> |
getInitialActions(JiraWorkflow workflow)
Gets the initial actions.
|
default String |
getIssueSecurityDescription(Long id)
Gets the issue security description.
|
List<IssueSecurityLevel> |
getIssueSecurityLevels()
Gets the issue security levels.
|
default String |
getIssueSecurityName(Long id)
Gets the issue security name.
|
Scheme |
getIssueSecurityScheme()
Gets the issue security scheme.
|
IssueType |
getIssueTypeById(String id)
Gets the issue type by id.
|
Map<String,String> |
getIssueTypeIds2WorkflowNames()
Gets the issueTypeIds map for workflow names.
|
Collection<IssueType> |
getIssueTypes()
Gets the issue types.
|
FieldConfigScheme |
getIssueTypeScheme()
Gets the issue type scheme.
|
IssueTypeScreenScheme |
getIssueTypeScreenScheme()
Gets the issue type screen scheme.
|
JiraAuthenticationContext |
getJiraAuthenticationContext()
Gets the jira authentication context.
|
ManagedConfigurationItem |
getManagedCustomField(CustomField customField)
Gets the managed custom field.
|
ManagedConfigurationItem |
getManagedWorkflow(JiraWorkflow workflow)
Gets the managed workflow.
|
ManagedConfigurationItem |
getManagedWorkflowScheme(Long schemeId)
Gets the managed workflow scheme.
|
ManagedConfigurationItem |
getManagedWorkflowScheme(WorkflowScheme workflowScheme)
Gets the managed workflow scheme.
|
Scheme |
getNotificationScheme()
Gets the notification scheme.
|
default List |
getNotificationsForEventType(EventType eventType)
Gets the notifications for event type.
|
List |
getNotificationsForEventType(Long eventTypeId)
Gets the notifications for event type.
|
Map<String,NotificationType> |
getNotificationTypes()
Gets the notification types.
|
String |
getPermissionName(ProjectPermissionKey permissionKey)
Get the localized permission name.
|
List<IssueSecurityLevelPermission> |
getPermissionsBySecurityLevel(Long securityLevelId)
Gets the permissions by security level.
|
Scheme |
getPermissionScheme()
Gets the permission scheme.
|
Collection<PermissionSchemeEntry> |
getPermissionSchemeEntries(Scheme scheme,
ProjectPermissionKey permissionKey)
Gets the permission scheme entries.
|
Collection<FunctionDescriptor> |
getPostfunctions(ActionDescriptor actionDescriptor)
Gets the postfunctions.
|
default @Null ImmutableList<Priority> |
getPrioritiesForScheme()
Gets the priorities for scheme.
|
default @Null FieldConfigScheme |
getPriorityScheme()
Gets the priority scheme if available..
|
Project |
getProject()
Gets the project.
|
Collection<ProjectPermissionKey> |
getProjectPermissionKeys()
Gets the project permission keys.
|
@Null String |
getProjectRoleById(@Null Long id)
Gets the project role by id.
|
@Null String |
getProjectRoleById(@Null String id)
Gets the project role by id.
|
Collection<ProjectRole> |
getProjectRoles()
Gets the project roles.
|
String |
getProjectUrl()
Gets the project url.
|
String |
getRendererDisplayName(String rendererType)
Gets the renderer display name.
|
IssueSecurityLevel |
getSecurityLevel(Long id)
Gets the security level.
|
String |
getStepName(JiraWorkflow workflow,
int id)
Gets the name of a step by id
|
Collection<StepDescriptor> |
getSteps(JiraWorkflow workflow)
Gets the steps.
|
Set<FieldLayout> |
getUniqueFieldLayouts()
Retrieves all the
FieldLayout 's for a project. |
ApplicationUser |
getUserByName(String username)
Gets the user by name.
|
Collection<ApplicationUser> |
getUsersInGroup(Group group)
Gets the users in group.
|
Collection<ApplicationUser> |
getUsersInGroup(String groupname)
Gets the users in group.
|
String |
getUUID()
Gets a new random uuid as a String.
|
Collection<ValidatorDescriptor> |
getValidators(ActionDescriptor actionDescriptor)
Gets the validators.
|
List<Version> |
getVersions()
Gets the versions.
|
JiraWorkflow |
getWorkflow(String name)
Gets the workflow.
|
Set<String> |
getWorkflowNames()
Gets the workflow names.
|
default Map<String,List<String>> |
getWorkflowNames2IssueTypeIds()
Gets the workflow names 2 issue type ids.
|
WorkflowScheme |
getWorkflowScheme()
Gets the workflow scheme.
|
Map<String,List<String>> |
invert(Map<String,String> map)
Invert any given String to String Map into a useful inverse
containing the former Values as Keys and Lists<String> as values
for the former keys.
|
boolean |
isCustomField(Field field)
Checks if is custom field.
|
default boolean |
isPrioritySchemesAvailable()
Checks if is priority schemes available.
|
String |
renderConditionDescription(ConditionDescriptor descriptor)
Gets the description of a Condition
|
String |
renderMacroTemplate(String templateName,
Map<String,Object> extraContext)
Renders macro template.
|
String |
renderPostFunctionDescription(FunctionDescriptor descriptor)
Gets the description of a postfunction
|
String |
renderValidatorDescription(ValidatorDescriptor descriptor)
Gets the description of a validator
|
Project getProject()
Map<String,Object> getGlobalContext()
String getUUID()
JiraAuthenticationContext getJiraAuthenticationContext()
ApplicationProperties getApplicationProperties()
String getBaseUrl()
String getProjectUrl()
String renderMacroTemplate(String templateName, Map<String,Object> extraContext)
templateName
- the template nameextraContext
- any extra contextWorkflowScheme getWorkflowScheme()
Map<String,String> getIssueTypeIds2WorkflowNames()
Map<String,List<String>> invert(Map<String,String> map)
map
- the mapdefault Map<String,List<String>> getWorkflowNames2IssueTypeIds()
Set<String> getWorkflowNames()
Collection<ProjectComponent> getComponents()
FieldConfigScheme getIssueTypeScheme()
Collection<IssueType> getIssueTypes()
IssueType getIssueTypeById(String id)
id
- the idCollection<ProjectRole> getProjectRoles()
ProjectRoleActors getActorsForProjectRole(ProjectRole projectRole)
projectRole
- the project roleApplicationUser getUserByName(String username)
username
- the usernameGroup getGroupByName(String groupname)
groupname
- the groupnameCollection<Group> getGroupsOfUser(ApplicationUser user)
user
- the userCollection<Group> getGroupsOfUser(String username)
username
- the usernameCollection<ApplicationUser> getUsersInGroup(String groupname)
groupname
- the groupnameCollection<ApplicationUser> getUsersInGroup(Group group)
group
- the groupScheme getPermissionScheme()
Scheme getNotificationScheme()
Collection<EventType> getEventTypes()
Map<Long,EventType> getEventTypesMap()
default List getNotificationsForEventType(EventType eventType)
eventType
- the event typeMap<String,NotificationType> getNotificationTypes()
List getNotificationsForEventType(Long eventTypeId)
eventTypeId
- the event type idScheme getIssueSecurityScheme()
IssueSecurityLevel getSecurityLevel(Long id)
id
- the idLong getDefaultSecurityLevel()
List<IssueSecurityLevel> getIssueSecurityLevels()
List<IssueSecurityLevelPermission> getPermissionsBySecurityLevel(Long securityLevelId)
securityLevelId
- the security level iddefault String getIssueSecurityName(Long id)
id
- the iddefault String getIssueSecurityDescription(Long id)
id
- the idCollection<ProjectPermissionKey> getProjectPermissionKeys()
String getPermissionName(ProjectPermissionKey permissionKey)
permissionKey
- Collection<PermissionSchemeEntry> getPermissionSchemeEntries(Scheme scheme, ProjectPermissionKey permissionKey)
scheme
- the schemepermissionKey
- the permission keyList<CustomField> getCustomFieldObjects(Long projectId, String issueType)
projectId
- the project idissueType
- the issue typeCollection<CustomField> getCustomFieldObjectsByName(String customFieldName)
customFieldName
- the custom field nameCustomField getCustomFieldObject(Long id)
id
- the idCustomField getCustomFieldObject(String id)
id
- the idJiraWorkflow getWorkflow(String name)
name
- the nameCollection<ActionDescriptor> getInitialActions(JiraWorkflow workflow)
workflow
- the workflowCollection<ActionDescriptor> getGlobalActions(JiraWorkflow workflow)
workflow
- the workflowCollection<StepDescriptor> getSteps(JiraWorkflow workflow)
workflow
- the workflowString getStepName(JiraWorkflow workflow, int id)
workflow
- the workflowid
- the Id of the stepCollection<ConditionsDescriptor> getConditions(ActionDescriptor actionDescriptor)
actionDescriptor
- the action descriptorCollection<ValidatorDescriptor> getValidators(ActionDescriptor actionDescriptor)
actionDescriptor
- the action descriptorCollection<FunctionDescriptor> getPostfunctions(ActionDescriptor actionDescriptor)
actionDescriptor
- the action descriptorString renderConditionDescription(ConditionDescriptor descriptor)
descriptor
- the descriptor of the conditionString renderValidatorDescription(ValidatorDescriptor descriptor)
descriptor
- the descriptor of the validatorString renderPostFunctionDescription(FunctionDescriptor descriptor)
descriptor
- the descriptor of the postfunction@Null @Null FieldScreen getFieldScreen(ActionDescriptor actionDescriptor)
actionDescriptor
- the action descriptorIssueTypeScreenScheme getIssueTypeScreenScheme()
@Null @Null String getProjectRoleById(@Null @Null String id)
id
- the id@Null @Null String getProjectRoleById(@Null @Null Long id)
id
- the iddefault int compareVersions(String v1, String v2)
v1
- the first versionv2
- the second versiondefault boolean isPrioritySchemesAvailable()
@Null default @Null FieldConfigScheme getPriorityScheme()
isPrioritySchemesAvailable()
@Null default @Null ImmutableList<Priority> getPrioritiesForScheme()
Set<FieldLayout> getUniqueFieldLayouts()
FieldLayout
's for a project.@Null @Null FieldLayoutScheme getFieldLayoutScheme()
Collection<FieldLayoutSchemeEntity> getFieldLayoutSchemeEntities()
FieldLayout getFieldLayoutByIssueType(String issueTypeId)
issueTypeId
- the issue type iddefault FieldLayout getFieldLayoutByIssueType(@NotNull @NotNull IssueType issueType)
issueType
- the issue typeDate getCurrentDate()
String formatDate(Date date, String format)
date
- the dateformat
- the format according to SimpleDateFormat
@Nonnull String fixHtml(@Nonnull String input)
input
- the inputList<FieldConfigScheme> getConfigSchemesForField(CustomField field)
field
- the fieldField getField(String id)
id
- the id, e.g. "summary" or "customfield_10100"boolean isCustomField(Field field)
field
- the fieldCollection<FieldScreenTab> getFieldScreenTabs(String fieldId)
fieldId
- the field id, e.g. "summary" or "customfield_10100"default Collection<FieldScreen> getFieldScreens(String fieldId)
fieldId
- the field id, e.g. "summary" or "customfield_10100"ManagedConfigurationItem getManagedCustomField(CustomField customField)
customField
- the custom fieldManagedConfigurationItem getManagedWorkflow(JiraWorkflow workflow)
workflow
- the workflowManagedConfigurationItem getManagedWorkflowScheme(Long schemeId)
schemeId
- the scheme idManagedConfigurationItem getManagedWorkflowScheme(WorkflowScheme workflowScheme)
workflowScheme
- the workflow schemeCopyright © 2021 catworkx GmbH. All rights reserved.