Ejemplo n.º 1
0
 protected List<String> collectCssClasses(List<String> collection) {
   try {
     if (pckg != null) {
       if (pckg.isInstalled()) {
         collection.add("installed");
       }
       if (pckg.isSealed()) {
         collection.add("sealed");
       }
       if (pckg.isValid()) {
         collection.add("valid");
       }
     }
   } catch (RepositoryException rex) {
     LOG.error(rex.getMessage(), rex);
   }
   return collection;
 }
Ejemplo n.º 2
0
 @Override
 public void initialize(BeanContext context, Resource resource) {
   SlingHttpServletRequest request = context.getRequest();
   path = PackageUtil.getPath(request);
   try {
     resource = PackageUtil.getResource(request, path);
   } catch (RepositoryException rex) {
     LOG.error(rex.getMessage(), rex);
   }
   super.initialize(context, resource);
   try {
     pckgMgr = PackageUtil.createPackageManager(getRequest());
     pckg = pckgMgr.open(getNode());
     if (pckg != null) {
       pckgDef = pckg.getDefinition();
     }
   } catch (RepositoryException rex) {
     LOG.error(rex.getMessage(), rex);
   }
 }