java.lang.Object
ru.cg.webbpm.studio.subsystems.page_designer.serialization.impl.component.ComponentRegistry

@Component public class ComponentRegistry extends Object
TODO WEBBPMNEXT-5089 improve caching
Author:
Tim Urmancheev
  • Constructor Details

  • Method Details

    • componentsLoaded

      public boolean componentsLoaded()
    • getDependantComponents

      public List<String> getDependantComponents(String componentObjectId)
    • getDependantComponentOverrides

      public List<String> getDependantComponentOverrides(String overrideRootObjectId)
    • getAllComponentIdByPages

      public Set<? extends Map.Entry<Path,Set<String>>> getAllComponentIdByPages()
    • getComponentPath

      public Optional<Path> getComponentPath(String objectId)
      Returns path to a component file containing object with specified id.
      Parameters:
      objectId - id of an object of component
      Returns:
      optional wrapping path to component
    • getComponent

      public Optional<Component> getComponent(String objectId)
      Returns component containing specified object, or a component with specified id
      Parameters:
      objectId - id of an object / component
      Returns:
      optional wrapping component
    • getComponentObject

      public Optional<PageObject> getComponentObject(String objectId)
    • getPrototype

      public Optional<PageObject> getPrototype(String prototypeId)
    • getAllComponents

      public Collection<Component> getAllComponents()
    • read

      public Component read(Path path)
    • getComponentPackagePath

      public Optional<Path> getComponentPackagePath(String componentObjectId)
      Returns an absolute path to the package that contains an object with specified id
      Parameters:
      componentObjectId - id of an object of component
      Returns:
      path to the package, if the component is inside a package
    • getPackage

      public Optional<Package> getPackage(String objectId)
      Returns a package containing an object with specified id, if any
      Parameters:
      objectId - object id or component id
      Returns:
      the package if it exists
    • evictPath

      public void evictPath(Path path)
    • clearCache

      public void clearCache()
    • save

      public void save(Component component, Path path)
    • saveOverride

      public void saveOverride(Component component)
    • evict

      public void evict(String componentObjectId)