Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.Postal


         org.gatein.pc.api.PortletContext pcContext = WSRPUtils.convertToPortalPortletContext(context);

         // does the specified registration allow access to the specified portlet?
         if (producer.getRegistrationManager().getPolicy().allowAccessTo(pcContext, registration, "getPortletDescription"))
         {
            PortletDescription description = getPortletDescription(context.getPortletHandle(), desiredLocales);

            // the producer doesn't know of the portlet so it's not a producer-offered portlet
            if (description == null)
            {
               // however, it might be a clone so check if the registration knows of a clone with that portlet context
View Full Code Here


       */
      public void removePortletDescription(org.gatein.pc.api.PortletContext pc)
      {
         String handle = WSRPUtils.convertToWSRPPortletContext(pc).getPortletHandle();

         PortletDescription description = getPortletDescription(handle, null);
         if (description != null)
         {
            // remove associated events
            for (QName event : description.getHandledEvents())
            {
               removeEvent(event);
            }
            for (QName event : description.getPublishedEvents())
            {
               removeEvent(event);
            }

            portletDescriptions.remove(handle);
View Full Code Here

      UserContext userContext = getPortletDescription.getUserContext();
      checkUserAuthorization(userContext);

      // RegistrationLocal.setRegistration is called further down the invocation in ServiceDescriptionHandler.getPortletDescription
      final List<String> desiredLocales = WSRPUtils.replaceByEmptyListIfNeeded(getPortletDescription.getDesiredLocales());
      PortletDescription description = producer.getPortletDescription(portletContext, desiredLocales, registration);
      return WSRPTypeFactory.createPortletDescriptionResponse(description);
   }
View Full Code Here

            WSRPConstants.getDefaultLocales(),
            modelDescription,
            resourceList,
            new Holder<List<Extension>>());

         PortletPropertyDescriptionResponse response = WSRPTypeFactory.createPortletPropertyDescriptionResponse(null);
         response.setModelDescription(modelDescription.value);
         response.setResourceList(resourceList.value);

         return response;
      }
      catch (InvalidHandle invalidHandleFault)
      {
View Full Code Here

      String city = infos.get(getPostalUserInfoKey(PostalInfo.CITY, isBusiness));
      String stateprov = infos.get(getPostalUserInfoKey(PostalInfo.STATEPROV, isBusiness));
      String postalCode = infos.get(getPostalUserInfoKey(PostalInfo.POSTALCODE, isBusiness));
      String country = infos.get(getPostalUserInfoKey(PostalInfo.COUNTRY, isBusiness));
      String organization = infos.get(getPostalUserInfoKey(PostalInfo.ORGANIZATION, isBusiness));
      Postal postal = WSRPTypeFactory.createPostal(name, street, city, stateprov, postalCode, country, organization);

      TelephoneNum telephone = createTelephoneNumFrom(infos, TelecomType.TELEPHONE, isBusiness);
      TelephoneNum fax = createTelephoneNumFrom(infos, TelecomType.FAX, isBusiness);
      TelephoneNum mobile = createTelephoneNumFrom(infos, TelecomType.MOBILE, isBusiness);
      TelephoneNum pager = createTelephoneNumFrom(infos, TelecomType.PAGER, isBusiness);
View Full Code Here

            {
               infos.put(getOnlineUserInfoKey(OnlineInfo.EMAIL, isBusiness), online.getEmail());
               infos.put(getOnlineUserInfoKey(OnlineInfo.URI, isBusiness), online.getUri());
            }

            Postal postal = contact.getPostal();
            if (postal != null)
            {
               infos.put(getPostalUserInfoKey(PostalInfo.NAME, isBusiness), postal.getName());
               infos.put(getPostalUserInfoKey(PostalInfo.STREET, isBusiness), postal.getStreet());
               infos.put(getPostalUserInfoKey(PostalInfo.CITY, isBusiness), postal.getCity());
               infos.put(getPostalUserInfoKey(PostalInfo.STATEPROV, isBusiness), postal.getStateprov());
               infos.put(getPostalUserInfoKey(PostalInfo.POSTALCODE, isBusiness), postal.getPostalcode());
               infos.put(getPostalUserInfoKey(PostalInfo.COUNTRY, isBusiness), postal.getCountry());
               infos.put(getPostalUserInfoKey(PostalInfo.ORGANIZATION, isBusiness), postal.getOrganization());
            }

            Telecom telecom = contact.getTelecom();
            if (telecom != null)
            {
View Full Code Here

   public static Contact toV2Context(V1Contact v1Contact)
   {
      if (v1Contact != null)
      {
         Postal postal = toV2Postal(v1Contact.getPostal());
         Telecom teleCom = toV2Telecom(v1Contact.getTelecom());
         Online online = toV2Online(v1Contact.getOnline());
         Contact contact = WSRPTypeFactory.createContact(postal, teleCom, online);

         List<V1Extension> extensions = v1Contact.getExtensions();
View Full Code Here

   public static Postal toV2Postal(V1Postal v1Postal)
   {
      if (v1Postal != null)
      {
         Postal postal = WSRPTypeFactory.createPostal(v1Postal.getName(), v1Postal.getStreet(), v1Postal.getCity(), v1Postal.getStateprov(), v1Postal.getPostalcode(), v1Postal.getCountry(), v1Postal.getOrganization());

         List<V1Extension> extensions = v1Postal.getExtensions();
         if (extensions != null)
         {
            postal.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return postal;
      }
      else
View Full Code Here

      return contact;
   }

   public static Postal createPostal(String name, String street, String city, String stateprov, String postalCode, String country, String organization)
   {
      Postal postal = new Postal();
      postal.setName(name);
      postal.setStreet(street);
      postal.setCity(city);
      postal.setStateprov(stateprov);
      postal.setPostalcode(postalCode);
      postal.setCountry(country);
      postal.setOrganization(organization);

      return postal;
   }
View Full Code Here

      return contact;
   }

   public static Postal createPostal(String name, String street, String city, String stateprov, String postalCode, String country, String organization)
   {
      Postal postal = new Postal();
      postal.setName(name);
      postal.setStreet(street);
      postal.setCity(city);
      postal.setStateprov(stateprov);
      postal.setPostalcode(postalCode);
      postal.setCountry(country);
      postal.setOrganization(organization);

      return postal;
   }
View Full Code Here

TOP

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

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.