Package org.exoplatform.portal.pom.data

Examples of org.exoplatform.portal.pom.data.ModelDataStorage


            gadget = transientApplicationState.getContentState();
        } else {
            // The only way to retrieve the information if the state is not transient is if we're within a portal context
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            if (container instanceof PortalContainer) {
                ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
                try {
                    gadget = dataStorage.load(state, ApplicationType.GADGET);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain gadget state from custom context.");
                }

                try {
                    contentId = dataStorage.getId(state);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain contentId from custom context.", e);
                }
            } else {
                throw new XMLStreamException("Cannot marshal application state " + state
View Full Code Here


        state = service.save(state, gadget);

        // WARNING :
        // This is used to force a state save and it should not be copied else where to make things
        // convenient as this could lead to a severe performance degradation
        ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
        mds.save();
    }
View Full Code Here

            gadget = transientApplicationState.getContentState();
        } else {
            // The only way to retrieve the information if the state is not transient is if we're within a portal context
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            if (container instanceof PortalContainer) {
                ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
                try {
                    gadget = dataStorage.load(state, ApplicationType.GADGET);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain gadget state from custom context.");
                }

                try {
                    contentId = dataStorage.getId(state);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain contentId from custom context.", e);
                }
            } else {
                throw new XMLStreamException("Cannot marshal application state " + state
View Full Code Here

      state = service.save(state, gadget);

      // WARNING :
      // This is used to force a state save and it should not be copied else where to make things
      // convenient as this could lead to a severe performance degradation
      ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
      mds.save();
   }
View Full Code Here

      {
         // The only way to retrieve the information if the state is not transient is if we're within a portal context
         ExoContainer container = ExoContainerContext.getCurrentContainer();
         if (container instanceof PortalContainer)
         {
            ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
            try
            {
               gadget = dataStorage.load(state, ApplicationType.GADGET);
            }
            catch (Exception e)
            {
               throw new XMLStreamException("Could not obtain gadget state from custom context.");
            }

            try
            {
               contentId = dataStorage.getId(state);
            }
            catch (Exception e)
            {
               throw new XMLStreamException("Could not obtain contentId from custom context.", e);
            }
View Full Code Here

      state = service.save(state, gadget);

      // WARNING :
      // This is used to force a state save and it should not be copied else where to make things
      // convenient as this could lead to a severe performance degradation
      ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
      mds.save();
   }
View Full Code Here

        state = service.save(state, gadget);

        // WARNING :
        // This is used to force a state save and it should not be copied else where to make things
        // convenient as this could lead to a severe performance degradation
        ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
        mds.save();
    }
View Full Code Here

            gadget = transientApplicationState.getContentState();
        } else {
            // The only way to retrieve the information if the state is not transient is if we're within a portal context
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            if (container instanceof PortalContainer) {
                ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
                try {
                    gadget = dataStorage.load(state, ApplicationType.GADGET);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain gadget state from custom context.");
                }

                try {
                    contentId = dataStorage.getId(state);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain contentId from custom context.", e);
                }
            } else {
                throw new XMLStreamException("Cannot marshal application state " + state
View Full Code Here

            gadget = transientApplicationState.getContentState();
        } else {
            // The only way to retrieve the information if the state is not transient is if we're within a portal context
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            if (container instanceof PortalContainer) {
                ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
                try {
                    gadget = dataStorage.load(state, ApplicationType.GADGET);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain gadget state from custom context.");
                }

                try {
                    contentId = dataStorage.getId(state);
                } catch (Exception e) {
                    throw new XMLStreamException("Could not obtain contentId from custom context.", e);
                }
            } else {
                throw new XMLStreamException("Cannot marshal application state " + state
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.pom.data.ModelDataStorage

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.