wt.csm.constraint
Class CSMConstraintFactory

java.lang.Object
  extended bywt.iba.constraint.AbstractConstraintGroupFactory
      extended bywt.csm.constraint.CSMConstraintFactory
All Implemented Interfaces:
Externalizable, NetFactor, Serializable

public class CSMConstraintFactory
extends AbstractConstraintGroupFactory
implements Externalizable

Use the newCSMConstraintFactory static factory method(s), not the CSMConstraintFactory constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String CONSTRAINT_GROUP_LABEL
           
static String CSM_CLASSNODE_SECRET_KEY
           
static long EXTERNALIZATION_VERSION_UID
           
static String key1
          

Supported API: false
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
CSMConstraintFactory()
           
 
Method Summary
private  ConstraintGroup addDepersistedAttributeConstraintsToGroup(long[] id, boolean isCSM, ConstraintGroup constraintGroup)
           
private  CSMSingleDefConstraint constructCSMSingleDefRankConstraint(IBAHolder ibaHolder)
           
private  CSMContainerConstraint createImmutableCSMContainerConstraint()
           
private  CSMSingleDefConstraint createImmutableCSMSingleDefConstraint()
           
private  ConstraintGroup depersistAttributeConstraintsAssociatedToValues(IBAHolder ibaHolder, boolean isCSM, ReferenceDefView referenceDefView, ConstraintGroup constraintGroup)
           
private  ConstraintGroup depersistClassificationNodeForAttributeConstraints(IBAHolder ibaHolder, boolean isCSM, ConstraintGroup constraintGroup)
           
private  ConstraintGroup depersistClassificationNodeForAttributeConstraints(IBAHolder ibaHolder, ConstraintGroup constraintGroup)
          Convenience method added to maintain old two parameter version.
private  AttributeDefDefaultView getAttributeDefDefaultViewByPath(String defPath)
           
private  AttributeDefReference getAttributeDefReference(AttributeDefDefaultView referenceDefView)
          Given a ReferenceDefView, converts to AbstractAttributeDefinition, converts to AttributeDefinitionReference then construct an AttributeDefReference.
private  ClassificationStructDefaultView getClassificationStructDefaultViewByName(String primaryClassName)
           
private  ClassificationStructDefaultView getClassificationStructDefaultViewByNodeView(IBAHolder ibaHolder)
           
 String getConceptualClassname()
          Deprecated.  
 ConstraintGroup getConstraintGroup(IBAHolder ibaHolder, Object constraintParameter)
          Get IBAHolder, do introspection to find all constraints for CSMContainerConstraint.class, CSMSingleDefConstraint.class.
private  boolean getCSMClassNodeSecretKey(Object constraintParameter)
           
private  String getIBAHolderClassName(IBAHolder ibaHolder)
           
protected  void initialize()
          

Supported API: false
static CSMConstraintFactory newCSMConstraintFactory()
          Default factory for the class.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(CSMConstraintFactory thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.iba.constraint.AbstractConstraintGroupFactory
getClassInfo, readVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

key1

public static final String key1


Supported API: false

See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

CSM_CLASSNODE_SECRET_KEY

public static final String CSM_CLASSNODE_SECRET_KEY
See Also:
Constant Field Values

CONSTRAINT_GROUP_LABEL

public static final String CONSTRAINT_GROUP_LABEL
See Also:
Constant Field Values
Constructor Detail

CSMConstraintFactory

public CSMConstraintFactory()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class AbstractConstraintGroupFactory
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class AbstractConstraintGroupFactory
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(CSMConstraintFactory thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getConstraintGroup

public ConstraintGroup getConstraintGroup(IBAHolder ibaHolder,
                                          Object constraintParameter)
                                   throws IBAConstraintException
Get IBAHolder, do introspection to find all constraints for CSMContainerConstraint.class, CSMSingleDefConstraint.class. Then use IBAHolder class name for resource boundle. This resource boundle file contains path(s) of the definition. Find AttrDefDefaultView then convert AbstractAttributeDefinition to AttributeDefinitionReference.

Specified by:
getConstraintGroup in class AbstractConstraintGroupFactory
Parameters:
ibaHolder -
constraintParameter -
Returns:
ConstraintGroup
Throws:
IBAConstraintException

newCSMConstraintFactory

public static CSMConstraintFactory newCSMConstraintFactory()
                                                    throws WTException
Default factory for the class.

Supported API: false

Returns:
CSMConstraintFactory
Throws:
WTException

initialize

protected void initialize()


Supported API: false

Specified by:
initialize in class AbstractConstraintGroupFactory

getClassificationStructDefaultViewByNodeView

private ClassificationStructDefaultView getClassificationStructDefaultViewByNodeView(IBAHolder ibaHolder)
                                                                              throws IBAConstraintException
Throws:
IBAConstraintException

getClassificationStructDefaultViewByName

private ClassificationStructDefaultView getClassificationStructDefaultViewByName(String primaryClassName)
                                                                          throws IBAConstraintException
Throws:
IBAConstraintException

createImmutableCSMSingleDefConstraint

private CSMSingleDefConstraint createImmutableCSMSingleDefConstraint()
                                                              throws IBAConstraintException
Throws:
IBAConstraintException

createImmutableCSMContainerConstraint

private CSMContainerConstraint createImmutableCSMContainerConstraint()
                                                              throws IBAConstraintException
Throws:
IBAConstraintException

constructCSMSingleDefRankConstraint

private CSMSingleDefConstraint constructCSMSingleDefRankConstraint(IBAHolder ibaHolder)
                                                            throws IBAConstraintException
Throws:
IBAConstraintException

getAttributeDefReference

private AttributeDefReference getAttributeDefReference(AttributeDefDefaultView referenceDefView)
                                                throws IBAConstraintException
Given a ReferenceDefView, converts to AbstractAttributeDefinition, converts to AttributeDefinitionReference then construct an AttributeDefReference.

Throws:
IBAConstraintException

getAttributeDefDefaultViewByPath

private AttributeDefDefaultView getAttributeDefDefaultViewByPath(String defPath)
                                                          throws IBAConstraintException
Throws:
IBAConstraintException

depersistClassificationNodeForAttributeConstraints

private ConstraintGroup depersistClassificationNodeForAttributeConstraints(IBAHolder ibaHolder,
                                                                           ConstraintGroup constraintGroup)
                                                                    throws IBAConstraintException
Convenience method added to maintain old two parameter version. the *real* method has a new "isCSM" parameter added. this parameter allows the caller to control whether immutable constraints will be added or not. Forward fitted from release 5.0 & 5.1 (SPR 842384).

Throws:
IBAConstraintException

depersistClassificationNodeForAttributeConstraints

private ConstraintGroup depersistClassificationNodeForAttributeConstraints(IBAHolder ibaHolder,
                                                                           boolean isCSM,
                                                                           ConstraintGroup constraintGroup)
                                                                    throws IBAConstraintException
Throws:
IBAConstraintException

depersistAttributeConstraintsAssociatedToValues

private ConstraintGroup depersistAttributeConstraintsAssociatedToValues(IBAHolder ibaHolder,
                                                                        boolean isCSM,
                                                                        ReferenceDefView referenceDefView,
                                                                        ConstraintGroup constraintGroup)
                                                                 throws IBAConstraintException
Throws:
IBAConstraintException

addDepersistedAttributeConstraintsToGroup

private ConstraintGroup addDepersistedAttributeConstraintsToGroup(long[] id,
                                                                  boolean isCSM,
                                                                  ConstraintGroup constraintGroup)
                                                           throws IBAConstraintException
Throws:
IBAConstraintException

getCSMClassNodeSecretKey

private boolean getCSMClassNodeSecretKey(Object constraintParameter)

getIBAHolderClassName

private String getIBAHolderClassName(IBAHolder ibaHolder)