com.neeve.sma
Class MessageViewFactoryDescriptor

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.sma.SmaObject
          extended by com.neeve.sma.MessageViewFactoryDescriptor

public final class MessageViewFactoryDescriptor
extends SmaObject

A message view factory descriptor.

This class contains information to describe a message view factory. It also contains methods to persist and load view factory descriptors to/from X Platform configuration respositories.

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

Method Summary
static MessageViewFactoryDescriptor create(String name, short id, String className)
          Create an smaty message view factory descriptor.
 void delete(IConfigRepository repo)
          Delete a message view factory descriptor from a configuration repository.
static boolean exists(IConfigRepository repo, String name)
          Checks if a message view factory descriptor is present in a configuration repository.
static boolean exists(String name)
          Checks if a message view factory descriptor is present in the local configuration repository
 String getClassName()
          Get the java class of the message view factory that this descriptor describes.
 short getId()
          Get the id of the message view factory that this descriptor describes.
 String getName()
          Get the name of the message view factory that this descriptor describes.
static MessageViewFactoryDescriptor load(IConfigRepository repo, String name)
          Create a message view factory descriptor from a configuration repository.
static MessageViewFactoryDescriptor load(String name)
          Create a message view factory descriptor from the local configuration repository.
static Map<Short,MessageViewFactoryDescriptor> loadAll()
          Create message view factory descriptors for all factories in the local configuration repository.
static Map<Short,MessageViewFactoryDescriptor> loadAll(IConfigRepository repo)
          Create message view factory descriptors for all factories in a configuration repository.
 void save()
          Save a message view factory descriptor to the defalt configuration repository.
 void save(IConfigRepository repo)
          Save a message view 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 message view factory that this descriptor describes.


getId

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


getClassName

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


save

public final void save(IConfigRepository repo)
                throws SmaException
Save a message view factory descriptor to a configuration repository.

Parameters:
repo - The configuration respository to save the descriptor to.
Throws:
SmaException - 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 a message view 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 SmaException
Save a message view factory descriptor to the defalt configuration repository.

Throws:
SmaException - 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 a message view 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 SmaException
Delete a message view factory descriptor from a configuration repository.

Parameters:
repo - The configuration respository to delete from.
Throws:
SmaException - 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 a message view 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 a message view 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 a message view factory descriptor is present in the local configuration repository

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

create

public static MessageViewFactoryDescriptor create(String name,
                                                  short id,
                                                  String className)
Create an smaty message view 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 MessageViewFactoryDescriptor load(IConfigRepository repo,
                                                String name)
                                         throws SmaException
Create a message view factory descriptor from a configuration repository.

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

This method creates and creates a message view factory descriptor from a configuration repository.


load

public static MessageViewFactoryDescriptor load(String name)
                                         throws SmaException
Create a message view factory descriptor from the local configuration repository.

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

This method creates and initializes a message view factory descriptor from the local configuration repository.


loadAll

public static Map<Short,MessageViewFactoryDescriptor> loadAll(IConfigRepository repo)
                                                       throws SmaException
Create message view factory descriptors for all factories in a configuration repository.

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

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

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

loadAll

public static Map<Short,MessageViewFactoryDescriptor> loadAll()
                                                       throws SmaException
Create message view factory descriptors for all factories in the local configuration repository.

Returns:
Returns the set of message view factories.

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

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


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