IDev Tree public interface IDev Tree extends ITree
IDev. Tree public interface IDev. Tree extends ITree { void add(String path, IManaged. Object object) throws Illegal. Argument. Exception; void has. Been. Filled(String path) throws Illegal. Argument. Exception; boolean is. Read. Only(); }
IStore • Store is a Proxy that presents data from some resource to a Tree. • Store is responsible for creating, deleting and updating AIDA objects that appear in the AIDA tree. • Store can be associated with only one Tree during its lifetime. This is an interface to a basic Store that can provide data in one piece only, like XML file. public interface IStore { boolean is. Read. Only(); void read(IDev. Tree tree, Map options, boolean read. Only, boolean create. New) throws IOException; void commit(IDev. Tree tree, Map options) throws IOException; void close() throws IOException; }
IOn. Demand. Store An interface to the store that can provide fine-grained data. public interface IOn. Demand. Store extends IStore { /** * Populate folder or create AIDA object in the tree. * If some folders along the path are missing, IOn. Demand. Store * must create them using ITree "mkdirs(path)" method. */ void read(IDev. Tree tree, String path) throws Illegal. Argument. Exception, IOException; }
Mutable Stores An interface to the store that can provide fine-grained data that changes with time public interface IMutable. Store extends IOn. Demand. Store { } public interface IDev. Mutable. Store extends IMutable. Store { /** * Initiates the process of updating content for an IManaged. Object. * Can be done synchronously or can just schedule update in some queue. */ void update. Data(String path, String type) throws Illegal. Argument. Exception; /** * Create an IManaged. Object that can be later updated. * If object already exist, do not overwrite it, just * return with, maybe, a warning. */ IManaged. Object create. Object(String name, String type) throws Illegal. Argument. Exception; }
- Slides: 4