|
||||||||||
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
User: mwent Date: Apr 29, 2009 Time: 9:59:45 AM
Constructor Summary | |
---|---|
RestHelper()
|
Method Summary | |
---|---|
static javax.ws.rs.core.UriInfo |
addAutoExpand(javax.ws.rs.core.UriInfo uriInfo,
java.lang.String expandable)
|
static void |
assertGlobalAdminReadPermission()
|
static void |
assertPlanExistsAndVisible(PlanManager planManager,
PlanKey planKey)
Checks if Plan exists and is visible for calling user |
static void |
assertReadPermission()
|
static RestPlans |
createPaginatedPlanResponse(java.util.Collection<Plan> plans,
LabelManager labelManager,
com.atlassian.user.User user,
javax.ws.rs.core.UriInfo uriInfo)
|
static java.lang.String |
formatDateTime(long datetime)
|
static BuildState |
getBuildStateQueryParam(javax.ws.rs.core.UriInfo uriInfo)
|
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 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 |
Constructor Detail |
---|
public RestHelper()
Method Detail |
---|
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)
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 RestPlans createPaginatedPlanResponse(java.util.Collection<Plan> plans, LabelManager labelManager, @Nullable com.atlassian.user.User user, javax.ws.rs.core.UriInfo uriInfo)
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 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 assertGlobalAdminReadPermission()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |