Esempio n. 1
0
 @Override
 public List<Widget> findByObjectId(Path directory, String objectId) throws IOException {
   List<Widget> findIn = new ArrayList<>();
   List<Widget> widgets = getAll(directory);
   for (Widget otherWidget : widgets) {
     if (otherWidget.getTemplate().contains("<" + Widget.spinalCase(objectId))) {
       findIn.add(otherWidget);
     }
   }
   return findIn;
 }
 @Override
 public void execute(Zipper zipper, Widget widget) throws IOException {
   zipper.addDirectoryToZip(
       pathResolver.getWidgetsRepositoryPath().resolve(widget.getId()),
       RESOURCES + "/" + widget.getId());
 }