Package org.exoplatform.application.registry

Examples of org.exoplatform.application.registry.ApplicationRegistryService


    public ApplicationCategory getSelectedCategory() {
        return selectedCategory;
    }

    public final List<ApplicationCategory> getCategories() throws Exception {
        ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);
        UserACL acl = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);

        String remoteUser = ((WebuiRequestContext) WebuiRequestContext.getCurrentInstance()).getRemoteUser();
        List<ApplicationCategory> listCategories = new ArrayList<ApplicationCategory>();

        Iterator<ApplicationCategory> appCateIte = service.getApplicationCategories(remoteUser, ApplicationType.GADGET)
                .iterator();
        while (appCateIte.hasNext()) {
            ApplicationCategory cate = appCateIte.next();
            for (String p : cate.getAccessPermissions()) {
                if (acl.hasPermission(p)) {
View Full Code Here


             *
             * @see UIDashboardSelectContainer#getGadgetsOfCategory(org.exoplatform.application.registry.ApplicationCategory)
             */
            objectId = objectId.replaceAll("_slash_", "/");

            ApplicationRegistryService service = uiDashboard.getApplicationComponent(ApplicationRegistryService.class);
            Application application = service.getApplication(objectId);
            if (application == null) {
                UIApplication uiApplication = context.getUIApplication();
                uiApplication.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
                context.setAttribute(UIDashboard.APP_NOT_EXIST, true);
                return;
View Full Code Here

   private ApplicationCategory selectedCategory;

   @SuppressWarnings("unchecked")
   public UIApplicationList() throws Exception
   {
      ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);
      String remoteUser = Util.getPortalRequestContext().getRemoteUser();
      if (remoteUser == null || remoteUser.equals(""))
         return;
      UserACL userACL = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);
      IdentityRegistry identityRegistry = Util.getUIPortalApplication().getApplicationComponent(IdentityRegistry.class);
      Identity identity = identityRegistry.getIdentity(remoteUser);
      if (identity == null)
         return;

      PortletComparator portletComparator = new PortletComparator();
      categories = service.getApplicationCategories(remoteUser);

      Iterator<ApplicationCategory> cateItr = categories.iterator();
      while (cateItr.hasNext())
      {
         ApplicationCategory cate = cateItr.next();
View Full Code Here

   public List<ApplicationCategory> getApplicationCategories(String remoteUser,
                                                             ApplicationType[] applicationType) throws Exception
   {
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      ApplicationRegistryService prService = (ApplicationRegistryService)container.getComponentInstanceOfType(ApplicationRegistryService.class);

      if (applicationType == null)
      {
         applicationType = new ApplicationType[0];
      }

      List<ApplicationCategory> appCategories = prService.getApplicationCategories(remoteUser,
         applicationType);

      if (appCategories == null)
      {
         appCategories = new ArrayList();
View Full Code Here

      return selectedCategory;
   }

   public final List<ApplicationCategory> getCategories() throws Exception
   {
      ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);

      String remoteUser = ((WebuiRequestContext)WebuiRequestContext.getCurrentInstance()).getRemoteUser();
      List<ApplicationCategory> listCategories =
         service.getApplicationCategories(remoteUser, ApplicationType.GADGET);

      Iterator<ApplicationCategory> appCateIte = listCategories.iterator();
      while (appCateIte.hasNext())
      {
         ApplicationCategory cate = appCateIte.next();
View Full Code Here

         }
         int col = Integer.parseInt(context.getRequestParameter(COLINDEX));
         int row = Integer.parseInt(context.getRequestParameter(ROWINDEX));
         String objectId = context.getRequestParameter(UIComponent.OBJECTID);

         ApplicationRegistryService service = uiDashboard.getApplicationComponent(ApplicationRegistryService.class);
         Application application = service.getApplication(objectId);
         if (application == null)
         {
            UIApplication uiApplication = context.getUIApplication();
            uiApplication.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
            return;
View Full Code Here

   @SuppressWarnings("unchecked")
   private StringBuilder getApplications(String remoteUser) throws Exception
   {
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      ApplicationRegistryService prService =
         (ApplicationRegistryService)container.getComponentInstanceOfType(ApplicationRegistryService.class);

      if (applicationType == null)
         applicationType = new ApplicationType<?>[0];
      List<ApplicationCategory> appCategories = prService.getApplicationCategories(remoteUser, applicationType);
      ApplicationCategoryToJSONPlugin toJSON = new ApplicationCategoryToJSONPlugin();

      StringBuilder value = new StringBuilder();
      JSONService jsonService = new JSONService();
      jsonService.register(ApplicationCategory.class, toJSON);
View Full Code Here

TOP

Related Classes of org.exoplatform.application.registry.ApplicationRegistryService

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.