Package org.exoplatform.web.application

Examples of org.exoplatform.web.application.ApplicationMessage


         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
View Full Code Here


         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // TODO ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         // remove selected navigation
         if (uicomp.navigations == null || uicomp.navigations.size() < 1)
View Full Code Here

         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIPortalApplication uiPortalApp = Util.getUIPortalApplication();

         if (defaultPortalName.equals(portalName))
         {
            uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.delete-default-portal",
               new String[]{defaultPortalName}, ApplicationMessage.WARNING));
            return;
         }

         UserPortalConfig config = service.getUserPortalConfig(portalName, prContext.getRemoteUser());
         if (config != null && config.getPortalConfig().isModifiable())
         {
            service.removeUserPortalConfig(portalName);
         }
         else if (config != null)
         {
            uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-deletePermission",
               new String[]{config.getPortalConfig().getName()}));;
            return;
         }
         else
         {
            if (uicomp.stillKeptInPageList(portalName))
            {
               uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
                  new String[]{portalName}));
            }
            return;
         }

         if (config == null && !Util.getUIPortal().getName().equals(portalName))
         {
            uiPortalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-deletePermission",
               new String[]{portalName}));
            return;
         }

         if (config == null || Util.getUIPortal().getName().equals(portalName))
View Full Code Here

         UserPortalConfig userConfig = service.getUserPortalConfig(portalName, prContext.getRemoteUser());

         if (userConfig == null)
         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
         PortalConfig portalConfig = userConfig.getPortalConfig();

         UserACL userACL = portalApp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(portalConfig))
         {
            portalApp.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission",
               new String[]{portalConfig.getName()}));
            return;
         }

         UIWorkingWorkspace uiWorkingWS = portalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
View Full Code Here

         //at all logical and should be modified after release 3.1 GA
         UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
         UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser());
         if(userPortalConfig == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
        
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig()))
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
         PageNavigation edittedNavigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
        
View Full Code Here

         if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1))
         {
            continue;
         }
         Object[] args = {label};
         throw new MessageException(new ApplicationMessage("NumberFormatValidator.msg.Invalid-number", args));
      }
   }
View Full Code Here

      catch (Exception e)
      {
         label = uiInput.getName();
      }
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage(key_, args, ApplicationMessage.WARNING));
   }
View Full Code Here

         return;
      String s = (String)uiInput.getValue();
      if (s.matches(EMAIL_REGEX))
         return;
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage("EmailAddressValidator.msg.Invalid-input", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

      }
      String s = (String)uiInput.getValue();
      if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-')
      {
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("FirstAndSpecialCharacterNameValidator.msg", args,
            ApplicationMessage.WARNING));
      }
      for (int i = 0; i < s.length(); i++)
      {
         char c = s.charAt(i);
         if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-')
         {
            continue;
         }
         Object[] args = {label};
         throw new MessageException(new ApplicationMessage("IdentifierValidator.msg.Invalid-char", args,
            ApplicationMessage.WARNING));
      }
   }
View Full Code Here

         Date stDate = sdf.parse(s);
         s = stFormat.format(stDate);
      }
      catch (Exception e)
      {
         throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
      }
      if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
         return;

      throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.web.application.ApplicationMessage

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.