Package org.exoplatform.application.gadget

Examples of org.exoplatform.application.gadget.Source


            return;
         }
         UIGadgetEditor uiEditor = uiManagement.getChild(UIGadgetEditor.class);
         if (uiEditor != null)
         {
            Source source = uiEditor.getSource();
            if (source != null && name.equals(uiEditor.getSourceName()))
            {
               UIApplication uiApp = ctx.getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIGadgetManagement.msg.deleteGadgetInUse", null));
               return;
View Full Code Here


                            ApplicationMessage.WARNING));
                    return;
                }
            }
            //
            Source source = new Source(gadgetName, "application/xml");
            source.setTextContent(text);
            source.setLastModified(Calendar.getInstance());

            try {
                sourceStorage.saveSource(gadget, source);
                uiManagement.removeChild(UIGadgetEditor.class);
                // This will update the source and also update the gadget related
View Full Code Here

                ctx.addUIComponentToUpdateByAjax(uiManagement);
                return;
            }
            UIGadgetEditor uiEditor = uiManagement.getChild(UIGadgetEditor.class);
            if (uiEditor != null) {
                Source source = uiEditor.getSource();
                if (source != null && name.equals(uiEditor.getSourceName())) {
                    UIApplication uiApp = ctx.getUIApplication();
                    uiApp.addMessage(new ApplicationMessage("UIGadgetManagement.msg.deleteGadgetInUse", null));
                    return;
                }
View Full Code Here

            String gadgetUrl = gadget.getUrl();
            String[] gaggetUrlPart = gadgetUrl.split("/");
            String dirPath = gaggetUrlPart[gaggetUrlPart.length - 2];
            // String dirPath = gaggetUrlPart[gaggetUrlPart.length - 9];
            // get gadget's source: path = dir path + file name
            Source source = sourceStorage.getSource(gadget);
            uiEditor.setSource(source);
            uiEditor.setGadgetName(gadget.getName());
            uiEditor.setDirPath(dirPath);
            uiManagement.getChildren().clear();
            uiManagement.addChild(uiEditor);
View Full Code Here

                 uiApp.addMessage(new ApplicationMessage("UIGadgetEditor.gadget.msg.gadgetIsExist", null, ApplicationMessage.WARNING));
                 return;
           }
         }
         //
         Source source = new Source(gadgetName, "application/xml");
         source.setTextContent(text);
         source.setLastModified(Calendar.getInstance());

         sourceStorage.saveSource(gadget, source);

         uiManagement.removeChild(UIGadgetEditor.class);
         // This will update the source and also update the gadget related
View Full Code Here

         String gadgetUrl = gadget.getUrl();
         String[] gaggetUrlPart = gadgetUrl.split("/");
         String dirPath = gaggetUrlPart[gaggetUrlPart.length - 2];
         //String dirPath = gaggetUrlPart[gaggetUrlPart.length - 9];
         // get gadget's source: path = dir path + file name
         Source source = sourceStorage.getSource(gadget);
         uiEditor.setSource(source);
         uiEditor.setGadgetName(gadget.getName());
         uiEditor.setDirPath(dirPath);
         uiManagement.getChildren().clear();
         uiManagement.addChild(uiEditor);
View Full Code Here

            String content = localData.getSource();
            Calendar lastModified = Calendar.getInstance();
            lastModified.setTime(localData.getLastModified());

            //
            Source source = new Source(gadget.getName());
            source.setMimeType(LocalGadgetData.GADGET_MIME_TYPE);
            source.setLastModified(lastModified);
            source.setTextContent(content);

            //
            return source;
        } else {
            throw new IllegalArgumentException("The provided gadget is remote");
View Full Code Here

         String content = localData.getSource();
         Calendar lastModified = Calendar.getInstance();
         lastModified.setTime(localData.getLastModified());

         //
         Source source = new Source(gadget.getName());
         source.setMimeType(LocalGadgetData.GADGET_MIME_TYPE);
         source.setLastModified(lastModified);
         source.setTextContent(content);

         //
         return source;
      }
      else
View Full Code Here

TOP

Related Classes of org.exoplatform.application.gadget.Source

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.