Ejemplo n.º 1
0
 @Override
 public void toResource(Resource resource, ResourceFilter filter) throws RepositoryException {
   super.toResource(resource, filter);
   StringFilter stringFilter = ((ResourceFilter.PatternFilter) filter).getFilter();
   Resource stringFilterRes =
       ResourceUtil.getOrCreateChild(resource, NODE_NAME_FILTER, ResourceUtil.TYPE_UNSTRUCTURED);
   StringFilterMapping.toResource(stringFilterRes, stringFilter);
 }
Ejemplo n.º 2
0
 @Override
 public void toResource(Resource resource, ResourceFilter filter) throws RepositoryException {
   super.toResource(resource, filter);
   ResourceFilter.FilterSet filterSet = (ResourceFilter.FilterSet) filter;
   ResourceHandle handle = ResourceHandle.use(resource);
   ResourceFilter.FilterSet.Rule rule = filterSet.getRule();
   handle.setProperty(PROPERTY_RULE, rule.name());
   List<ResourceFilter> set = filterSet.getSet();
   ResourceHandle entry;
   for (int i = 0; i < set.size(); i++) {
     entry =
         ResourceHandle.use(
             ResourceUtil.getOrCreateChild(
                 resource, NODE_NAME_ENTRY + "-" + i, ResourceUtil.TYPE_UNSTRUCTURED));
     ResourceFilterMapping.toResource(entry, set.get(i));
   }
 }