Package org.exoplatform.application.registry

Examples of org.exoplatform.application.registry.ApplicationCategory


         UIApplicationOrganizer uiOrganizer = event.getSource();
         String name = event.getRequestContext().getRequestParameter(OBJECTID);
         UICategoryForm uiCategoryForm = uiOrganizer.getChild(UICategoryForm.class);
         if (uiCategoryForm != null)
         {
            ApplicationCategory edittingCategory = uiCategoryForm.getCategory();
            if (edittingCategory != null && edittingCategory.getName().equals(name))
            {
               UIApplication uiApp = event.getRequestContext().getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIOrganizer.msg.deleteCategoryInUse", null));
               return;
            }
View Full Code Here


        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)) {
                    List<Application> listGadgets = cate.getApplications();
                    if (listGadgets != null && listGadgets.size() > 0) {
                        listCategories.add(cate);
                        break;
                    }
                }
View Full Code Here

        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)) {
                    List<Application> listGadgets = cate.getApplications();
                    if (listGadgets != null && listGadgets.size() > 0) {
                        listCategories.add(cate);
                        break;
                    }
                }
View Full Code Here

      categories = service.getApplicationCategories(remoteUser);

      Iterator<ApplicationCategory> cateItr = categories.iterator();
      while (cateItr.hasNext())
      {
         ApplicationCategory cate = cateItr.next();
         List<Application> applications = cate.getApplications();
         boolean hasPermission = false;
         List<String> accessPermission = cate.getAccessPermissions();
         if (accessPermission == null)
         {
            accessPermission = new ArrayList<String>();
         }
         if (accessPermission.size() == 0)
View Full Code Here

      else
      {
         Iterator<ApplicationCategory> cateItr = appCategories.iterator();
         while (cateItr.hasNext())
         {
            ApplicationCategory cate = cateItr.next();
            List<Application> applications = cate.getApplications();
            if (applications.size() < 1)
            {
               cateItr.remove();
            }
         }
View Full Code Here

        //
        ContentRegistry registry = getContentRegistry();

        //
        for (CategoryDefinition categoryDef : registry.getCategoryList()) {
            ApplicationCategory category = load(categoryDef, appTypes);
            categories.add(category);
        }

        //
        if (sortComparator != null) {
View Full Code Here

        ContentRegistry registry = getContentRegistry();

        //
        CategoryDefinition categoryDef = registry.getCategory(name);
        if (categoryDef != null) {
            ApplicationCategory applicationCategory = load(categoryDef);
            return applicationCategory;
        }

        //
        return null;
View Full Code Here

        categoryDef.setCreationDate(category.getCreatedDate());
        categoryDef.setLastModificationDate(category.getModifiedDate());
    }

    private ApplicationCategory load(CategoryDefinition categoryDef, ApplicationType<?>... appTypes) {
        ApplicationCategory category = new ApplicationCategory();

        //
        category.setName(categoryDef.getName());
        category.setDisplayName(categoryDef.getDisplayName());
        category.setDescription(categoryDef.getDescription());
        category.setAccessPermissions(new ArrayList<String>(categoryDef.getAccessPermissions()));
        category.setCreatedDate(categoryDef.getCreationDate());
        category.setModifiedDate(categoryDef.getLastModificationDate());

        //
        for (ContentDefinition contentDef : categoryDef.getContentList()) {
            Application application = load(contentDef);
            if (isApplicationType(application, appTypes)) {
                category.getApplications().add(application);
            }
        }

        //
        return category;
View Full Code Here

      ContentRegistry registry = getContentRegistry();

      //
      for (CategoryDefinition categoryDef : registry.getCategoryList())
      {
         ApplicationCategory category = load(categoryDef, appTypes);
         categories.add(category);
      }

      //
      if (sortComparator != null)
View Full Code Here

      //
      CategoryDefinition categoryDef = registry.getCategory(name);
      if (categoryDef != null)
      {
         ApplicationCategory applicationCategory = load(categoryDef);
         return applicationCategory;
      }

      //
      return null;
View Full Code Here

TOP

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

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.