Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.ReleaseSessions


      if (sessionIDs.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a ReleaseSessions with an empty list of session IDs!");
      }

      ReleaseSessions sessions = new ReleaseSessions();
      sessions.setRegistrationContext(registrationContext);
      if (ParameterValidation.existsAndIsNotEmpty(sessionIDs))
      {
         sessions.getSessionIDs().addAll(sessionIDs);
      }
      return sessions;
   }
View Full Code Here


   ) throws AccessDenied, InvalidRegistration, MissingParameters, ModifyRegistrationRequired, OperationFailed,
      OperationNotSupported, ResourceSuspended
   {
      forceSessionAccess();

      ReleaseSessions releaseSessions = WSRPTypeFactory.createReleaseSessions(registrationContext, sessionIDs);

      return producer.releaseSessions(releaseSessions);
   }
View Full Code Here

      @WebParam(name = "sessionIDs", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") List<String> sessionIDs
   ) throws V1MissingParameters, V1InvalidRegistration, V1AccessDenied, V1OperationFailed
   {
      forceSessionAccess();

      ReleaseSessions releaseSessions = WSRPTypeFactory.createReleaseSessions(
         V1ToV2Converter.toV2RegistrationContext(registrationContext),
         sessionIDs
      );

      List<Extension> extensions;
View Full Code Here

      if (sessionIDs.isEmpty())
      {
         throw new IllegalArgumentException("Cannot create a ReleaseSessions with an empty list of session IDs!");
      }

      ReleaseSessions sessions = new ReleaseSessions();
      sessions.setRegistrationContext(registrationContext);
      if (ParameterValidation.existsAndIsNotEmpty(sessionIDs))
      {
         sessions.getSessionIDs().addAll(sessionIDs);
      }
      return sessions;
   }
View Full Code Here

      GetResource getResource = ResourceServingUtil.decode(req);

      try
      {
         ResourceResponse resource = producer.getResource(getResource);
         ResourceContext resourceContext = resource.getResourceContext();
         byte[] itemBinary = resourceContext.getItemBinary();
         String itemString = resourceContext.getItemString();

         final String mimeType = resourceContext.getMimeType();
         if (!ParameterValidation.isNullOrEmpty(mimeType))
         {
            resp.setContentType(mimeType);
         }
View Full Code Here

            }
         }

         List<FailedPortlets> failedPortlets = new ArrayList<FailedPortlets>(failedPortletsMap.values());
         //TODO: handle resources properly
         ResourceList resourceList = null;
         return WSRPTypeFactory.createCopyPortletsResponse(copiedPortlets, failedPortlets, resourceList);
      }
      catch (Exception e)
      {
         throw WSRP2ExceptionFactory.throwWSException(OperationFailed.class, "Operation Failed while trying to CopyPortlets.", e);
View Full Code Here

               }
            }
         }

         //TODO: handle resourceLists better (should be using for things like errors)
         ResourceList resourceList = null;

         byte[] exportContextBytes = exportManager.encodeExportContextData(exportContext);

         Lifetime lifetime = null;
View Full Code Here

                  failedPortlets.getImportID().add(importPortlet.getImportID());
               }
            }
         }

         ResourceList resourceList = null; //TODO: figure out what exactly should be stored in the resource list here

         return WSRPTypeFactory.createImportPortletsResponse(importedPortlets, new ArrayList<ImportPortletsFailed>(failedPortletsMap.values()), resourceList);
      }
      finally
      {
View Full Code Here

   protected PortletInvocation internalInitInvocation(WSRPPortletInvocationContext context)
   {
      ResourceInvocation resourceInvocation = new ResourceInvocation(context);

      ResourceParams resourceParams = this.request.getResourceParams();

      // only set the resource id if it's different from the place holder we use if the portlet doesn't set one
      String id = this.request.getResourceParams().getResourceID();
      if (!WSRPResourceURL.DEFAULT_RESOURCE_ID.equals(id))
      {
         resourceInvocation.setResourceId(id);
      }

      WSRPRequestContext requestContext = WSRPRequestContext.createRequestContext(markupRequest, resourceParams);
      resourceInvocation.setRequestContext(requestContext);
      resourceInvocation.setForm(requestContext.getForm());

      //TODO: property set validation token for caching (ie ETAG)
      String validationToken = null;
      resourceInvocation.setValidationToken(validationToken);

      resourceInvocation.setResourceState(createNavigationalState(resourceParams.getResourceState()));

      String resourceCacheability = resourceParams.getResourceCacheability();
      if (resourceCacheability != null)
      {
         CacheLevel cacheLevel = WSRPUtils.getCacheLevelFromResourceCacheability(resourceParams.getResourceCacheability());
         resourceInvocation.setCacheLevel(cacheLevel);
      }
      else
      {
         // according to JSR 286, cache level must default to ResourceURL.PAGE
View Full Code Here

      GetResource getResource = ResourceServingUtil.decode(req);

      try
      {
         ResourceResponse resource = producer.getResource(getResource);
         ResourceContext resourceContext = resource.getResourceContext();
         byte[] itemBinary = resourceContext.getItemBinary();
         String itemString = resourceContext.getItemString();

         final String mimeType = resourceContext.getMimeType();
         if (!ParameterValidation.isNullOrEmpty(mimeType))
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.ReleaseSessions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.