コード例 #1
0
ファイル: ResourceAbstract.java プロジェクト: Rustemt/isis
  protected void init(
      final RepresentationType representationType,
      final Where where,
      final String urlUnencodedQueryString) {
    if (!IsisContext.inSession()) {
      throw RestfulObjectsApplicationException.create(HttpStatusCode.UNAUTHORIZED);
    }
    if (getAuthenticationSession() == null) {
      throw RestfulObjectsApplicationException.create(HttpStatusCode.UNAUTHORIZED);
    }

    this.resourceContext =
        new ResourceContext(
            representationType,
            httpHeaders,
            providers,
            uriInfo,
            request,
            where,
            urlUnencodedQueryString,
            httpServletRequest,
            httpServletResponse,
            securityContext,
            getDeploymentType(),
            getConfiguration(),
            getServicesInjector(),
            getSpecificationLoader(),
            getAuthenticationSession(),
            getLocalization(),
            getPersistenceSession(),
            InteractionInitiatedBy.USER);
  }
コード例 #2
0
 private void ensureInSession() {
   ensureThatContext(IsisContext.inSession(), is(true));
 }