com.neeve.ods
Class StoreObjectFactoryDescriptor

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.ods.OdsObject
          extended by com.neeve.ods.StoreObjectFactoryDescriptor

public final class StoreObjectFactoryDescriptor
extends OdsObject

The ODS object factory descriptor.

This class contains information to describe an ODS object factory. It also contains methods to persist and load object factory descriptors to/from X Platform configuration respositories.

Threading:
This class is safe for concurrent access by multiple threads.

Method Summary
static StoreObjectFactoryDescriptor create(String name, short id, String className)
          Create an object factory descriptor.
 void delete(IConfigRepository repo)
          Delete an object factory descriptor from a configuration repository.
static boolean exists(IConfigRepository repo, String name)
          Checks if an object factory descriptor is present in a configuration repository.
static boolean exists(String name)
          Checks if an object factory descriptor is present in the local configuration repository
 String getClassName()
          Get the java class of the object factory that this descriptor describes.
 short getId()
          Get the id of the object factory that this descriptor describes.
 String getName()
          Get the name of the object factory that this descriptor describes.
static StoreObjectFactoryDescriptor load(IConfigRepository repo, String name)
          Create an object factory descriptor from a configuration repository.
static StoreObjectFactoryDescriptor load(String name)
          Create an object factory descriptor from the local configuration repository.
static Map<Short,StoreObjectFactoryDescriptor> loadAll()
          Create object factory descriptors for all factories in the local configuration repository.
static Map<Short,StoreObjectFactoryDescriptor> loadAll(IConfigRepository repo)
          Create object factory descriptors for all factories in a configuration repository.
 void save()
          Save an object factory descriptor to the defalt configuration repository.
 void save(IConfigRepository repo)
          Save an object factory descriptor to a configuration repository.
 String toString()
          Returns a string representation of this object
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public final String getName()
Get the name of the object factory that this descriptor describes.


getId

public final short getId()
Get the id of the object factory that this descriptor describes.


getClassName

public final String getClassName()
Get the java class of the object factory that this descriptor describes.


save

public final void save(IConfigRepository repo)
                throws OdsException
Save an object factory descriptor to a configuration repository.

Parameters:
repo - The configuration respository to save the descriptor to.
Throws:
OdsException - Thrown in case an error in encountered during the saving of the object.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method saves an object factory descriptor to a configuration repository. The descriptor is stored in a format suitable for loading subsequently using any of the load methods offered by this class.


save

public final void save()
                throws OdsException
Save an object factory descriptor to the defalt configuration repository.

Throws:
OdsException - Thrown in case an error in encountered during the saving of the object.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method saves an object factory descriptor to the default configuration repository. The descriptor is stored in a format suitable for loading subsequently using any of the load methods offered by this class.


delete

public final void delete(IConfigRepository repo)
                  throws OdsException
Delete an object factory descriptor from a configuration repository.

Parameters:
repo - The configuration respository to delete from.
Throws:
OdsException - Thrown in case an error in encountered during the deletion of the descriptor.
Threading:
This method is notsafe for concurrent access by multiple threads.

This method deletes an object factory descriptor from a configuration repository.


toString

public final String toString()
Returns a string representation of this object

Overrides:
toString in class Object

exists

public static boolean exists(IConfigRepository repo,
                             String name)
Checks if an object factory descriptor is present in a configuration repository.

Parameters:
repo - The configuration respository to check in.
name - The name of the factory to check for.
Threading:
This method is safe for concurrent access by multiple threads.

exists

public static boolean exists(String name)
Checks if an object factory descriptor is present in the local configuration repository

Parameters:
name - The name of the object factory to check for.
Threading:
This method is safe for concurrent access by multiple threads.

create

public static StoreObjectFactoryDescriptor create(String name,
                                                  short id,
                                                  String className)
Create an object factory descriptor.

Parameters:
name - The name of the factory.
id - The factory's unique identifier.
className - The name of the factory's class.
Threading:
This method is safe for concurrent access by multiple threads.

load

public static StoreObjectFactoryDescriptor load(IConfigRepository repo,
                                                String name)
                                         throws OdsException
Create an object factory descriptor from a configuration repository.

Parameters:
repo - The configuration respository to create the descriptor from.
name - The name of the factory.
Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

This method creates and creates an object factory descriptor from a configuration repository.


load

public static StoreObjectFactoryDescriptor load(String name)
                                         throws OdsException
Create an object factory descriptor from the local configuration repository.

Parameters:
name - The name of the factory.
Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

This method creates and initializes an object factory descriptor from the local configuration repository.


loadAll

public static Map<Short,StoreObjectFactoryDescriptor> loadAll(IConfigRepository repo)
                                                       throws OdsException
Create object factory descriptors for all factories in a configuration repository.

Parameters:
repo - The configuration respository to load the factories from.
Returns:
Returns the set of object factory descriptors.

This method creates and initializes object factory descriptors for each of the providers present in the configuration repository.

Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.

loadAll

public static Map<Short,StoreObjectFactoryDescriptor> loadAll()
                                                       throws OdsException
Create object factory descriptors for all factories in the local configuration repository.

Returns:
Returns the set of store object factories.

This method creates and initializes object factory descriptors for each of the factories present in the local configuration repository.

Throws:
OdsException
Threading:
This method is safe for concurrent access by multiple threads.


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.