Package com.atlassian.jira.util
Class JiraUtils
java.lang.Object
com.atlassian.jira.util.JiraUtils
Miscellaneous utility methods. Most have moved into more specific classes.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intget24HourTime(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 StringReturns the server ip where the vm is running.static booleanReturns true if JIRA is really running in public mode.static booleanisSetup()Deprecated.static booleanisSetUp()Indicates whether JIRA has been set up.
-
Field Details
-
AM
- See Also:
-
PM
- See Also:
-
-
Constructor Details
-
JiraUtils
public JiraUtils()
-
-
Method Details
-
isPublicMode
public static boolean isPublicMode()Returns true if JIRA is really running in public mode.That is, JIRA Mode is enabled AND there is at least one writable User Directory.
JRA-15966 Public mode should only be allowed if External User Management is disabled, otherwise we cannot create a new user in JIRA. Older versions of JIRA would allow the admin to set up an invalid combination of both External User Management and Public Mode enabled, and so we need to account for this possibility.
- Returns:
- true if we allow public signup in this JIRA instance.
-
get24HourTime
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 pmhours- 1-12- Returns:
- 1-24
-
isSetUp
public static boolean isSetUp()Indicates whether JIRA has been set up.- Returns:
- see above
- Since:
- 7.4
-
isSetup
Deprecated.The casing of this method is misleading; useisSetUp()instead. Since v7.4.Indicates whether JIRA has been set up.- Returns:
- see above
-
getHostname
Returns the server ip where the vm is running.- Returns:
- the ip or if error 0.0.0.0
-
isSetUp()instead.