Interface ITemplateBinding

All Superinterfaces:
IElement, IEntity, IHyperlinkOwner, INamedElement

public interface ITemplateBinding extends INamedElement
Interface for Template Binding.
  • Method Details

    • getBoundElement

      IClass getBoundElement()
      Get Bound Element.
      Returns:
      boundElement
    • getTemplate

      IClass getTemplate()
      Get Template Class.
      Returns:
      templateClass
    • getActualMap

      Map getActualMap()
      Get Actual Map of the Template Binding
      Returns:
      the actual Map. Key: IClassifierTemplateParameter. Value: Object (IClass for class, String for expression)
    • getQualifiedActualMap

      Map getQualifiedActualMap()
      Get Qualified Actual Map of the Template Binding
      Returns:
      the actual Map. Key: IClassifierTemplateParameter. Value: Object (IClass for class, String for expression)
    • addActualParameter

      void addActualParameter(IClassifierTemplateParameter param, Object actual)
      Add Actual Parameter.
      Parameters:
      param - Template Parameter
      actual - Actual Parameter
       if type(type of the parameter) is Unspecified, it can be any class existed in the project
              if type is a primitive type, it should be a String value here.
              if type is a normal class, it should be the class or one of it's subclasses.
              if type is an anonymous bound class, same or related bound class can NOT be set here because of loop.
              Otherwise, InvalidEditingException will be occurred.
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community.
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_TARGET_CLASSIFIER_KEY - if target classifier doesn't exist.
              FORBID_SUBSYSTEM_KEY - if a subsystem is set to a template parameter.
              TEMPLATE_PARAM_ACTUAL_VALUE_ERROR_KEY - if an actual value cannot be set to a template parameter.
              INVALID_PARAMETER_KEY - if a parameter cannot be set to a template class.
              ANONYMOUS_BOUND_CLASS_LOOP_KEY - if an anonymous bound class loops.
              MUST_SUB_CLASS_ERROR_KEY - if the type of parameter is not a sub class.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.
      Values:
              Error messages for exceptions.
    • addQualifiedActualParameter

      void addQualifiedActualParameter(IClassifierTemplateParameter param, Object actual)
      Add Qualified Actual Parameter.
      Parameters:
      param - Template Parameter
      actual - Actual Parameter
       if type(type of the parameter) is Unspecified, it can be any class existed in the project
              if type is a primitive type, it should be a String value here.
              if type is a normal class, it should be the class or one of it's subclasses.
              if type is an anonymous bound class, same or related bound class can NOT be set here because of loop.
              Otherwise, InvalidEditingException will be occurred.
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community.
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              NO_TARGET_CLASSIFIER_KEY - if target classifier doesn't exist.
              FORBID_SUBSYSTEM_KEY - if a subsystem is set to a template parameter.
              TEMPLATE_PARAM_ACTUAL_VALUE_ERROR_KEY - if an actual value cannot be set to a template parameter.
              INVALID_PARAMETER_KEY - if a parameter cannot be set to a template class.
              ANONYMOUS_BOUND_CLASS_LOOP_KEY - if an anonymous bound class loops.
              MUST_SUB_CLASS_ERROR_KEY - if the type of parameter is not a sub class.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.
      Values:
              Error messages for exceptions.
    • removeActualParameter

      void removeActualParameter(IClassifierTemplateParameter param)
      Remove Actual Parameter.
      Parameters:
      param - Template Parameter
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community.
              PARAMETER_ERROR_KEY - if a parameter is not set properly.
              ILLEGALMODELTYPE_ERROR_KEY - if the model type is illegal.
              INVALID_PARAMETER_KEY - if a parameter cannot be set to a template class.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.
      Values:
              Error messages for exceptions.
    • setActualParameterTypeModifier

      void setActualParameterTypeModifier(IClassifierTemplateParameter param, String typeModifier)
      Set Actual Parameter's Type Modifier.
      Parameters:
      param - Template Parameter
      typeModifier - Type Modifier
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Keys:
              ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community.
              INVALID_TYPE_MODIFIER_MODEL_ERROR_KEY - if a Type Modifier cannot be set to the model.
              BAD_TRANSACTION_KEY - Bad Transaction.
              HAS_EXCEPTION_KEY - if an exception has occurred.
              READ_ONLY_KEY - if a read-only element is edited.
      Values:
              Error messages for exceptions.
    • getActualParameterTypeModifier

      String getActualParameterTypeModifier(IClassifierTemplateParameter param)
      get Actual's TypeModifier from the param.
      Parameters:
      param - Template Parameter
      Throws:
      InvalidEditingException - InvalidEditingException occurs.
      Values:
              Error messages for exceptions.