Module platform

Class FileFactory

All Implemented Interfaces:
Manageable, PersistenceCapable, Shareable, RegistryContext, UIItem, UserFields, XObject, Described, Map, Serializable

public class FileFactory extends ObjectItemFactory
See Also:
  • Field Details

  • Constructor Details

    • FileFactory

      public FileFactory()
  • Method Details

    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class ObjectItemFactory
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class ObjectItemFactory
      Returns:
      new instance of class of this node
    • createItemImpl

      protected Object createItemImpl(Context ctx)
      Overrides:
      createItemImpl in class ObjectItemFactory
    • evaluate

      public Object evaluate(RegistryContext ctx, StringMap args)
      Overrides:
      evaluate in class ObjectItemFactory
    • addFromURL

      public Object addFromURL(Registry reg, URL url, ModifiableMap params, Workbench ui)
      Reads an object from url. If necessary, an item reference to the object is created in the registry.
      Parameters:
      reg - registry in which the reference shall be created
      url - URL to read
      params - parameters, may be null
      ui - workbench to use for UI
      Returns:
      the import object, or null in case of problems
    • addFromFilterSource

      public Object addFromFilterSource(Registry reg, FilterSource fs, ModifiableMap params, Workbench ui)
      Reads an object from a given FilterSoruce. If necessary, an item reference to the object is created in the registry.
      Parameters:
      reg - registry in which the reference shall be created
      fs - a filtersource
      params - parameters, may be null
      ui - workbench to use for UI
      Returns:
      the import object, or null in case of problems
    • linkFromURLToResourceDir

      public Object linkFromURLToResourceDir(Registry reg, URL url, ModifiableMap params, Workbench ui, Item dest)
      Reads an object from url. Add an item from url into a resource directory. Does not create a copy on local file system.
      Parameters:
      reg - registry in which the reference shall be created
      url - URL to read
      params - parameters, may be null
      ui - workbench to use for UI
      dest - A resource directory in the registry where the file will be added
      Returns:
      the import object, or null in case of problems