com.atlassian.jira.util
Class JiraUtils

java.lang.Object
  extended by com.atlassian.jira.util.JiraUtils

public class JiraUtils
extends Object

Miscellaneous utility methods. Most have moved into more specific classes.

See Also:
JiraEntityUtils, JiraKeyUtils, JiraTypeUtils, UserUtil, AttachmentUtils

Field Summary
static String AM
           
static String PM
           
 
Constructor Summary
JiraUtils()
           
 
Method Summary
static int get24HourTime(String meridianIndicator, int hours)
          Calculate meridian adjustment add 12 hours if meridian is set to PM - note 12pm is 12:00 in 24 hour time.
static boolean isPublicMode()
           
static boolean isSetup()
           
static Object loadComponent(Class componentClass)
           
static Object loadComponent(Class componentClass, Collection extraParamaters)
           
static Object loadComponent(String className, Class callingClass)
          This method will load and construct a class, but also pass it through PicoContainer, to inject any dependencies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AM

public static final String AM
See Also:
Constant Field Values

PM

public static final String PM
See Also:
Constant Field Values
Constructor Detail

JiraUtils

public JiraUtils()
Method Detail

isPublicMode

public static boolean isPublicMode()
Returns:
True if JIRA is running in public mode

loadComponent

public static Object loadComponent(String className,
                                   Class callingClass)
                            throws ClassNotFoundException
This method will load and construct a class, but also pass it through PicoContainer, to inject any dependencies.

Parameters:
className - the name of the class to load.
callingClass - the class requesting the class be loaded.
Returns:
the instance of the requested class.
Throws:
ClassNotFoundException - if the class is not found on the classpath of the classloader of the calling class.
See Also:
ClassLoaderUtils.loadClass(java.lang.String,java.lang.Class), ComponentManager

loadComponent

public static Object loadComponent(Class componentClass)

loadComponent

public static Object loadComponent(Class componentClass,
                                   Collection extraParamaters)

get24HourTime

public static int get24HourTime(String meridianIndicator,
                                int hours)
Calculate meridian adjustment add 12 hours if meridian is set to PM - note 12pm is 12:00 in 24 hour time.

Parameters:
meridianIndicator - am or pm
hours - 1-12
Returns:
1-24

isSetup

public static boolean isSetup()


Copyright © 2002-2008 Atlassian. All Rights Reserved.