Class Profile

java.lang.Object
pygar.configuration.Profile
Direct Known Subclasses:
ClientProfile, ProfileDemo0

@NotThreadSafe
public abstract class Profile
extends java.lang.Object

This abstract class defines objects that are used to perform initialization and configuration for applications. Each application constructs a single object from the class and the class contains data members that specify the configuration.

An important design pattern here is the use of data members that are objects which contain factory methods. The purpose of the pattern is that it allows the program to be configured easily with different implementations according the the following straightforward method.

  • Define the desired functions as part of an interface or abstract class
  • Write one or more implementations of the functions as subclasses.
  • Configure the Profile object by initializing the corresponding field with an object provided by the factory method of the desired subclass.
  • Employ the implemented function by referencing the field in the profile object and invoking the method from the object.
  • This configuration method is used for the communication system and cryptography systems as well as others.

    The factory method returns an object that is used in the program. Such objects have functions that are
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String charSetName  
      java.lang.String commonDirPath
      Whoops, it turns out that for testing in configurations that adopt a shared file space for interprocess communication, we need a path to that common file area.
      java.lang.String configurationDirPath
      Path to the configuration files.
      java.lang.String connectionFactoryName
      Configure the Enterprise Java environment.
      CryptoEngine cryptoEngine
      Configure Cryptography: 1.
      java.lang.String dataDirPath
      Path to the data files, if any.
      java.lang.String entityAlias
      Name of the entity in the distributed, networked system that is running the current application.
      java.lang.String entityTitle
      An optional title that may appear on application GUI windows that may be associated with this entity.
      protected EncryptedFieldTable fieldTable
      Configure properties of data documents This table defines the fields in the documents exchanged in the distributed system.
      KeyStoreAccess keystoreObject
      Configure Identity Management: 1.
      java.lang.String keystorePasswordToken  
      PmessageSystem messageSystem
      Configure Communication: 1.
      static Profile profile
      A single instance of this class.
      java.util.Map<java.lang.String,​java.lang.String> queueNameTable  
      SessionKeyStore sessionKeyStore  
      char[] vaultPassword  
    • Constructor Summary

      Constructors 
      Constructor Description
      Profile()  
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getCharsetName()
      Retrieve the name of the character set used in the documents.
      CryptoEngine getCrypto()
      Cryptographic operations are performed by methods in an object of type CryptoEngine - an exemplar of which is returned by this function.
      EncryptedFieldTable getEncryptedFieldTable()  
      KeyStoreAccess getKeyStoreAccess()
      Return an object that has a method to obtain a Java KeyStore.
      static Profile getProfile()
      Configuration options are set into a single example of the class Profile via the subclass constructors.
      java.lang.String getThisAlias()
      Return the alias name of the entity running the software as appears in the KeyStore.
      abstract void initEE()
      Complete the construction of the object for the Java EE version of Demo0G.

      Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Details

      • profile

        public static Profile profile
        A single instance of this class.
      • cryptoEngine

        public CryptoEngine cryptoEngine
        Configure Cryptography: 1. The desired version of the cryptographic algorithms. 2. Session key management
      • sessionKeyStore

        public SessionKeyStore sessionKeyStore
      • messageSystem

        public PmessageSystem messageSystem
        Configure Communication: 1. The desired message delivery system
      • keystoreObject

        public KeyStoreAccess keystoreObject
        Configure Identity Management: 1. The desired identity key management system 2a. Implementation dependent token for key management - may be null. 2b. Implementation dependent token for key management - may be null. important: 2b is regarded as more secure and should be preferred over 2a
      • keystorePasswordToken

        public java.lang.String keystorePasswordToken
      • vaultPassword

        public char[] vaultPassword
      • fieldTable

        protected EncryptedFieldTable fieldTable
        Configure properties of data documents This table defines the fields in the documents exchanged in the distributed system. For each field, it specifies how it should be encrypted.
      • charSetName

        public java.lang.String charSetName
      • connectionFactoryName

        public java.lang.String connectionFactoryName
        Configure the Enterprise Java environment. The queueNameTable uses the name of a peer or agent as a key to lookup the name of the JMS queue that accepts messages bound for that entity.
      • queueNameTable

        public java.util.Map<java.lang.String,​java.lang.String> queueNameTable
      • entityAlias

        public java.lang.String entityAlias
        Name of the entity in the distributed, networked system that is running the current application. This name is necessary to look up identities and manage communication between entities.
      • entityTitle

        public java.lang.String entityTitle
        An optional title that may appear on application GUI windows that may be associated with this entity.
      • configurationDirPath

        public java.lang.String configurationDirPath
        Path to the configuration files.
      • dataDirPath

        public java.lang.String dataDirPath
        Path to the data files, if any. Alternatively this might store the path to the DBMS where data is actually stored.
      • commonDirPath

        public java.lang.String commonDirPath
        Whoops, it turns out that for testing in configurations that adopt a shared file space for interprocess communication, we need a path to that common file area.
    • Constructor Details

    • Method Details