com.ibm.wsspi.wim

Class SchemaHelper

  • java.lang.Object
    • com.ibm.wsspi.wim.SchemaHelper


  • public class SchemaHelper
    extends java.lang.Object
    Schema related utility methods for SPI(adapter)/Plugin providers.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SchemaHelper() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static EClass getEClass(java.lang.String qualifiedEntityTypeName)
      Returns the org.eclipse.emf.ecore.EClass object of the given qualified entity type name.
      static EClass getEClass(Type type)
      Returns the org.eclipse.emf.ecore.EClass object of the given type object.
      static java.util.List getProperties(java.lang.String qualifiedEntityTypeName)
      Returns all the properties of an entity type.
      static java.lang.String getTypeNsURI(java.lang.String qualifiedEntityTypeName)
      Returns the name space URI of the given qualified type.
      static boolean isGroupType(java.lang.String entityType)
      Returns true if the entity type is Group or an extension of Group.
      static boolean isLoginAccountType(java.lang.String entityType)
      Returns true if the entity type is LoginAccount or an extension of LoginAccount.
      static boolean isMultiValuedProperty(java.lang.String qualifiedEntityType, java.lang.String qualifiedPropName)
      Returns true if the property name is a multi-valued property for the entity type.
      static boolean isReferenceProperty(java.lang.String propName)
      Returns true if the property name is a reference type property (for example, manager, secretary).
      static boolean isSuperType(java.lang.String superType, java.lang.String subType)
      Returns true if one entity type is super type of another.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SchemaHelper

        public SchemaHelper()
    • Method Detail

      • isSuperType

        public static boolean isSuperType(java.lang.String superType,
                          java.lang.String subType)
        Returns true if one entity type is super type of another.
        Parameters:
        superType - super entity type.
        subType - sub entity type.
        Return:
        True if one entity type is super type of another, false otherwise.
      • isLoginAccountType

        public static boolean isLoginAccountType(java.lang.String entityType)
        Returns true if the entity type is LoginAccount or an extension of LoginAccount.
        Parameters:
        entityType - entity type.
        Return:
        True if the entity type is LoginAccount or an extension of LoginAccount, false otherwise.
      • isGroupType

        public static boolean isGroupType(java.lang.String entityType)
        Returns true if the entity type is Group or an extension of Group.
        Parameters:
        entityType - entity type.
        Return:
        True if the entity type is Group or an extension of Group, false otherwise.
      • getEClass

        public static EClass getEClass(java.lang.String qualifiedEntityTypeName)
        Returns the org.eclipse.emf.ecore.EClass object of the given qualified entity type name. Types under WIM package should not have any name space prefix. For example, "PersonAccount". Types under packages need to have name space prefix added to the type name with format ":". For example, wimext:EPerson, yourco:MyPerson.
        Parameters:
        qualifiedEntityTypeName - the qualified entity type name with format ":".
        Return:
        The org.eclipse.emf.ecore.EClass object for the entity type.
      • getEClass

        public static EClass getEClass(Type type)
        Returns the org.eclipse.emf.ecore.EClass object of the given type object. If the type is not found, null will be returned.
        Parameters:
        type - The type object of entity type.
        Return:
        The org.eclipse.emf.ecore.EClass object for the entity type.
      • getTypeNsURI

        public static java.lang.String getTypeNsURI(java.lang.String qualifiedEntityTypeName)
        Returns the name space URI of the given qualified type. The qualified type name has format ":".
        Parameters:
        qualifiedEntityTypeName - the qualified entity type name with format ":".
        Return:
        The name space URI of the package.
      • getProperties

        public static java.util.List getProperties(java.lang.String qualifiedEntityTypeName)
        Returns all the properties of an entity type.
        Parameters:
        qualifiedEntityTypeName - the qualified entity type name with format ":".
        Return:
        A list of commonj.sdo.Property objects.
      • isReferenceProperty

        public static boolean isReferenceProperty(java.lang.String propName)
                                           throws WIMException
        Returns true if the property name is a reference type property (for example, manager, secretary).
        Parameters:
        propName - property name.
        Throws:
        WIMException
        Return:
        True if the property name is a reference type property, false otherwise.
      • isMultiValuedProperty

        public static boolean isMultiValuedProperty(java.lang.String qualifiedEntityType,
                                    java.lang.String qualifiedPropName)
        Returns true if the property name is a multi-valued property for the entity type.
        Parameters:
        qualifiedEntityType - entity type.
        qualifiedPropName - property name.
        Return:
        True if the property name is a multi-valued property, false otherwise.