|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plugins.rest.common.RestHelper
public final class RestHelper
Method Summary | |
---|---|
static javax.ws.rs.core.UriInfo |
addAutoExpand(javax.ws.rs.core.UriInfo uriInfo,
java.lang.String expandable)
|
static void |
assertExecutePermission(java.lang.String planKey)
|
static void |
assertGlobalAdminReadPermission()
|
static void |
assertPlanExistsAndVisible(PlanManager planManager,
PlanKey planKey)
Checks if Plan exists and is visible for calling user |
static void |
assertReadPermission()
|
static java.lang.String |
formatDateTime(long datetime)
|
static BuildState |
getBuildStateQueryParam(javax.ws.rs.core.UriInfo uriInfo)
|
static Chain |
getChainByKey(PlanManager planManager,
PlanKey planKey)
Returns a Plan if plan exists and is visible for calling user |
static boolean |
getFavouriteQueryParam(javax.ws.rs.core.UriInfo uriInfo)
|
static java.util.Map<java.lang.String,java.lang.String> |
getFormParamsMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> formParams)
Returns first occurrence of parameters map |
static I18nBean |
getI18nBean()
|
static Plan |
getPlanByKey(PlanManager planManager,
PlanKey planKey)
Returns a Plan if plan exists and is visible for calling user |
static java.lang.Class |
getPlanType(javax.ws.rs.core.UriInfo uriInfo)
|
static java.util.List<java.lang.String> |
getQueryParamAsList(javax.ws.rs.core.UriInfo uriInfo,
java.lang.String key)
|
static java.util.Map<java.lang.String,java.lang.String> |
getQueryParamsMap(javax.ws.rs.core.UriInfo uriInfo)
Returns first occurrence of parameters map |
static java.net.URI |
getReturnUri(javax.ws.rs.core.UriInfo uriInfo)
Content of 'returnUrl' request parameter or null if empty. |
static boolean |
hasCloverEnabledQueryParam(javax.ws.rs.core.UriInfo uriInfo)
|
static boolean |
hasQueryParam(javax.ws.rs.core.UriInfo uriInfo,
java.lang.String param)
|
static boolean |
hasWithBuildPermissionOnlyParam(javax.ws.rs.core.UriInfo uriInfo)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static I18nBean getI18nBean()
public static javax.ws.rs.core.UriInfo addAutoExpand(javax.ws.rs.core.UriInfo uriInfo, java.lang.String expandable)
public static boolean getFavouriteQueryParam(javax.ws.rs.core.UriInfo uriInfo)
public static java.lang.Class getPlanType(javax.ws.rs.core.UriInfo uriInfo)
public static boolean hasCloverEnabledQueryParam(javax.ws.rs.core.UriInfo uriInfo)
public static boolean hasWithBuildPermissionOnlyParam(javax.ws.rs.core.UriInfo uriInfo)
public static boolean hasQueryParam(javax.ws.rs.core.UriInfo uriInfo, java.lang.String param)
@Nullable public static java.util.List<java.lang.String> getQueryParamAsList(javax.ws.rs.core.UriInfo uriInfo, java.lang.String key)
@NotNull public static java.util.Map<java.lang.String,java.lang.String> getQueryParamsMap(javax.ws.rs.core.UriInfo uriInfo)
uriInfo
-
@NotNull public static java.util.Map<java.lang.String,java.lang.String> getFormParamsMap(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> formParams)
formParams
-
public static BuildState getBuildStateQueryParam(@NotNull javax.ws.rs.core.UriInfo uriInfo)
public static Plan getPlanByKey(PlanManager planManager, PlanKey planKey)
Plan
if plan exists and is visible for calling user
planManager
- planKey
-
NotFoundException,
- AccessDeniedExceptionpublic static Chain getChainByKey(PlanManager planManager, PlanKey planKey)
Plan
if plan exists and is visible for calling user
planManager
- planKey
-
NotFoundException,
- AccessDeniedExceptionpublic static void assertPlanExistsAndVisible(PlanManager planManager, PlanKey planKey)
Plan
exists and is visible for calling user
planManager
- planKey
-
NotFoundException,
- AccessDeniedExceptionpublic static java.lang.String formatDateTime(long datetime)
@Nullable public static java.net.URI getReturnUri(javax.ws.rs.core.UriInfo uriInfo)
uriInfo
-
public static void assertReadPermission()
public static void assertExecutePermission(java.lang.String planKey)
public static void assertGlobalAdminReadPermission()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |