com.atlassian.jira.webtest.selenium.harness.util
Class AdministrationImpl

java.lang.Object
  extended by com.atlassian.jira.webtest.selenium.harness.util.AbstractSeleniumUtil
      extended by com.atlassian.jira.webtest.selenium.harness.util.AdministrationImpl
All Implemented Interfaces:
Administration

public class AdministrationImpl
extends AbstractSeleniumUtil
implements Administration


Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.selenium.harness.util.AbstractSeleniumUtil
environmentData, PAGE_LOAD_WAIT, selenium
 
Constructor Summary
AdministrationImpl(SeleniumContext ctx)
           
 
Method Summary
 void activateTimeTracking()
          Navigates to the admin section and enables time tracking
 void addPermissionForUser(String username, String permissionScheme, String permission)
           
 void addUserToGroup(String username, String group)
           
 void createProject(String name, String key, String lead)
          Creates a project through the add project page
 void disableAttachments()
           
 void disablePluginModule(String pluginId, String moduleName)
          Disabled a plugin module via the UPM
 void enableAttachments()
           
 void enableAttachments(String maxSize)
          Enables attachmenets, setting the max attachment size to the input provided.
 void enableGzipCompression()
          Enables GZIP compression in the admin section
 void enablePluginModule(String pluginId, String moduleName)
          Enable a plugin module via the UPM
 String getCurrentAttachmentPath()
          Obtains the current attachment path configured for JIRA.
 void removeRolePermission(int permissionId, int roleId)
          Removes a role permission in the default permission scheme
 void setMimeSniffingPolicy(String policy)
          Set the mime sniffing policy for attachments in the admin section to the setting provided.
 void setProfiling(boolean turnOn)
          Set JIRA's profiling on or off.
 void setRendererForField(String fieldId, String renderer)
          Sets the renderer for the field provided in the default field configuration.
 void toogleCommentGroupVisibility(boolean enable)
          Toggles group visibility in the security level dropdown for comments.
 
Methods inherited from class com.atlassian.jira.webtest.selenium.harness.util.AbstractSeleniumUtil
getEnvironmentData, getSelenium
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdministrationImpl

public AdministrationImpl(SeleniumContext ctx)
Method Detail

addPermissionForUser

public void addPermissionForUser(String username,
                                 String permissionScheme,
                                 String permission)
Specified by:
addPermissionForUser in interface Administration

addUserToGroup

public void addUserToGroup(String username,
                           String group)
Specified by:
addUserToGroup in interface Administration

setProfiling

public void setProfiling(boolean turnOn)
Description copied from interface: Administration
Set JIRA's profiling on or off.

Specified by:
setProfiling in interface Administration
Parameters:
turnOn - or off

enableAttachments

public void enableAttachments()
Specified by:
enableAttachments in interface Administration

enableAttachments

public void enableAttachments(String maxSize)
Description copied from interface: Administration
Enables attachmenets, setting the max attachment size to the input provided.

Specified by:
enableAttachments in interface Administration
Parameters:
maxSize - The max size for attachments

disableAttachments

public void disableAttachments()
Specified by:
disableAttachments in interface Administration

activateTimeTracking

public void activateTimeTracking()
Description copied from interface: Administration
Navigates to the admin section and enables time tracking

Specified by:
activateTimeTracking in interface Administration

getCurrentAttachmentPath

public String getCurrentAttachmentPath()
Description copied from interface: Administration
Obtains the current attachment path configured for JIRA.

This method does not check whether Attachments are enabled or not. If JIRA is configured to use the "default" attachment path, then this method still returns the ACTUAL path that is used.

The implementation navigates to the Admin Attachments Settings page and screenscrapes, so don't expect to remain on the same page as when you called the method.

Specified by:
getCurrentAttachmentPath in interface Administration
Returns:
the current attachment path configured for JIRA.

setMimeSniffingPolicy

public void setMimeSniffingPolicy(String policy)
Description copied from interface: Administration
Set the mime sniffing policy for attachments in the admin section to the setting provided.

Specified by:
setMimeSniffingPolicy in interface Administration
Parameters:
policy - the policy to set to

enableGzipCompression

public void enableGzipCompression()
Description copied from interface: Administration
Enables GZIP compression in the admin section

Specified by:
enableGzipCompression in interface Administration

toogleCommentGroupVisibility

public void toogleCommentGroupVisibility(boolean enable)
Description copied from interface: Administration
Toggles group visibility in the security level dropdown for comments.

Specified by:
toogleCommentGroupVisibility in interface Administration
Parameters:
enable - To enable groups in the dropdown.

removeRolePermission

public void removeRolePermission(int permissionId,
                                 int roleId)
Description copied from interface: Administration
Removes a role permission in the default permission scheme

Specified by:
removeRolePermission in interface Administration
Parameters:
permissionId - The id of the permission
roleId - The role to remove

setRendererForField

public void setRendererForField(String fieldId,
                                String renderer)
Description copied from interface: Administration
Sets the renderer for the field provided in the default field configuration.

Specified by:
setRendererForField in interface Administration
Parameters:
fieldId - The fieldid to set the renderer for
renderer - The new renderer to set

disablePluginModule

public void disablePluginModule(String pluginId,
                                String moduleName)
Description copied from interface: Administration
Disabled a plugin module via the UPM

Specified by:
disablePluginModule in interface Administration
Parameters:
pluginId - the upm plugin id
moduleName - the module to disable

enablePluginModule

public void enablePluginModule(String pluginId,
                               String moduleName)
Description copied from interface: Administration
Enable a plugin module via the UPM

Specified by:
enablePluginModule in interface Administration
Parameters:
pluginId - the upm plugin id
moduleName - the module to enable

createProject

public void createProject(String name,
                          String key,
                          String lead)
Description copied from interface: Administration
Creates a project through the add project page

Specified by:
createProject in interface Administration
Parameters:
name - project name
key - project key
lead - project lead


Copyright © 2002-2013 Atlassian. All Rights Reserved.