Package org.exoplatform.portal.pom.spi.gadget

Examples of org.exoplatform.portal.pom.spi.gadget.Gadget


      super.tearDown();
   }

   public void testBilto() throws Exception
   {
      Gadget gadget = new Gadget();
      gadget.setUserPref("user_pref");
      TransientApplicationState<Gadget> state = new TransientApplicationState<Gadget>("bar", gadget);
      Application<Gadget> gadgetApplication = Application.createGadgetApplication();
      gadgetApplication.setState(state);

      Page container = new Page();
      container.setPageId("portal::test::gadget_page");
      container.getChildren().add(gadgetApplication);

      storage_.create(container);

      container = storage_.getPage("portal::test::gadget_page");
      gadgetApplication = (Application<Gadget>)container.getChildren().get(0);

      gadget = storage_.load(gadgetApplication.getState(), ApplicationType.GADGET);
      assertNotNull(gadget);
      assertEquals("user_pref", gadget.getUserPref());
   }
View Full Code Here


        // Marshal ApplicationState
        ApplicationState<Gadget> state = gadgetApplication.getState();

        // Marshal application state
        String contentId;
        Gadget gadget;
        // If transient we have all the information we need
        if (state instanceof TransientApplicationState) {
            TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
            contentId = transientApplicationState.getContentId();
            gadget = transientApplicationState.getContentState();
View Full Code Here

            throws XMLStreamException {
        requiresChild(navigator, Element.GADGET_REF);
        String gadgetRef = getRequiredContent(navigator, true);

        // TODO: Implement userPref unmarshalling when gatein_objects support it
        Gadget gadget = null;

        if (navigator.next() != null) {
            throw unexpectedElement(navigator);
        }
View Full Code Here

        TransientApplicationState state;
        // Since we don't support dashboard's here, this only works for gadgets using the gadget wrapper portlet.
        if ("gadget-application".equals(m_name)) {
            ctx.parsePastStartTag(m_uri, "gadget");
            String gadgetName = ctx.parseElementText(m_uri, "gadget-ref");
            Gadget gadget = null;
            // Once the gadget portlet wrapper is able to use gadget userPref's, include parsing logic here.
            // Gadget gadget = new Gadget();
            // gadget.setUserPref();
            state = new TransientApplicationState<Gadget>(gadgetName, gadget);
            app = Application.createGadgetApplication();
View Full Code Here

        // Marshal ApplicationState
        ApplicationState<Gadget> state = gadgetApplication.getState();

        // Marshal application state
        String contentId;
        Gadget gadget;
        // If transient we have all the information we need
        if (state instanceof TransientApplicationState) {
            TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
            contentId = transientApplicationState.getContentId();
            gadget = transientApplicationState.getContentState();
View Full Code Here

            throws XMLStreamException {
        requiresChild(navigator, Element.GADGET_REF);
        String gadgetRef = getRequiredContent(navigator, true);

        // TODO: Implement userPref unmarshalling when gatein_objects support it
        Gadget gadget = null;

        if (navigator.next() != null) {
            throw unexpectedElement(navigator);
        }
View Full Code Here

      // Since we don't support dashboard's here, this only works for gadgets using the gadget wrapper portlet.
      else if ("gadget-application".equals(m_name))
      {
         ctx.parsePastStartTag(m_uri, "gadget");
         String gadgetName = ctx.parseElementText(m_uri, "gadget-ref");
         Gadget gadget = null;
         // Once the gadget portlet wrapper is able to use gadget userPref's, include parsing logic here.
         // Gadget gadget = new Gadget();
         // gadget.setUserPref();
         state = new TransientApplicationState<Gadget>(gadgetName, gadget);
         app = Application.createGadgetApplication();
View Full Code Here

      // Marshal ApplicationState
      ApplicationState<Gadget> state = gadgetApplication.getState();

      // Marshal application state
      String contentId;
      Gadget gadget;
      // If transient we have all the information we need
      if (state instanceof TransientApplicationState)
      {
         TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
         contentId = transientApplicationState.getContentId();
View Full Code Here

   {
      requiresChild(navigator, Element.GADGET_REF);
      String gadgetRef = getRequiredContent(navigator, true);

      //TODO: Implement userPref unmarshalling when gatein_objects support it
      Gadget gadget = null;

      if (navigator.next() != null)
      {
         throw unexpectedElement(navigator);
      }
View Full Code Here

        // Marshal ApplicationState
        ApplicationState<Gadget> state = gadgetApplication.getState();

        // Marshal application state
        String contentId;
        Gadget gadget;
        // If transient we have all the information we need
        if (state instanceof TransientApplicationState) {
            TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
            contentId = transientApplicationState.getContentId();
            gadget = transientApplicationState.getContentState();
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.pom.spi.gadget.Gadget

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.