16
#N14 Pattern Value (aka Substring attribute) SDD 1.1 Proposal

#N14 Pattern Value (aka Substring attribute)

  • Upload
    nardo

  • View
    22

  • Download
    0

Embed Size (px)

DESCRIPTION

#N14 Pattern Value (aka Substring attribute). SDD 1.1 Proposal. Current Situation. descriptorLanguageBundle is an optional attribute for both the Package Descriptor and the Deployment Descriptor Thus, requires text in the Spec as: - PowerPoint PPT Presentation

Citation preview

Page 1: #N14 Pattern Value (aka Substring attribute)

#N14 Pattern Value(aka Substring attribute)

SDD 1.1 Proposal

Page 2: #N14 Pattern Value (aka Substring attribute)

Current Situation• descriptorLanguageBundle is an optional

attribute for both the Package Descriptor and the Deployment Descriptor

– Thus, requires text in the Spec as:• The descriptorLanguageBundle attribute can be specified in both

the PackageDescriptor and the DeploymentDescriptor, although the latter is not required. If it is included in both, the values entered in the descriptorLanguageBundle attribute MUST match exactly.

• The schema causes this issue which makes it unnecessarily hard for both SDD creation tools and SDD runtime tools

Page 3: #N14 Pattern Value (aka Substring attribute)

Current Schema

• DescriptorInfoGroup– <xsd:attributeGroup name="DescriptorInfoGroup">

• <xsd:attribute name="schemaVersion" type="xsd:string" fixed="1.0" use="required"/>• <xsd:attribute name="descriptorID" type="sdd-common:UUIDType" use="required"/>• <xsd:attribute name="lastModified" type="xsd:dateTime" use="required"/>• <xsd:attribute name="descriptorLanguageBundle" type="xsd:token" use="optional"/>• <xsd:anyAttribute namespace="##other" processContents="lax"/>

– </xsd:attributeGroup>

• DeploymentDescriptor– <xsd:complexType name="DeploymentDescriptorType">– <xsd:sequence>– <xsd:element name="Topology" type="sdd-dd:TopologyType"/>– <xsd:choice>– <xsd:choice>– <xsd:element name="InstallableUnit" type="sdd-dd:InstallableUnitType"/>– <xsd:element name="ConfigurationUnit" type="sdd-dd:ConfigurationUnitType"/>– <xsd:element name="LocalizationUnit" type="sdd-dd:LocalizationUnitType"/>– </xsd:choice>– <xsd:sequence maxOccurs="unbounded">– <xsd:element name="CompositeInstallable" type="sdd-dd:CompositeInstallableType"/>– </xsd:sequence>– </xsd:choice>– <xsd:element name="Requisites" type="sdd-dd:RequisitesType" minOccurs="0"/>– <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>– </xsd:sequence>– <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/>– </xsd:complexType>

• PackageDescriptor– <xsd:complexType name="PackageDescriptorType">– <xsd:sequence>– <xsd:element name="PackageIdentity" type="sdd-pd:PackageIdentityType"/>– <xsd:element name="Contents" type="sdd-pd:ContentsType"/>– <xsd:element ref="ds:Signature" minOccurs="0"/>– </xsd:sequence>– <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/>– </xsd:complexType>

Page 4: #N14 Pattern Value (aka Substring attribute)

Propsed Schema

• DescriptorInfoGroup– <xsd:attributeGroup name="DescriptorInfoGroup">

• <xsd:attribute name="schemaVersion" type="xsd:string" fixed="1.0" use="required"/>• <xsd:attribute name="descriptorID" type="sdd-common:UUIDType" use="required"/>• <xsd:attribute name="lastModified" type="xsd:dateTime" use="required"/>

– </xsd:attributeGroup>

• DeploymentDescriptor– <xsd:complexType name="DeploymentDescriptorType">– <xsd:sequence>– <xsd:element name="Topology" type="sdd-dd:TopologyType"/>– <xsd:choice>– <xsd:choice>– <xsd:element name="InstallableUnit" type="sdd-dd:InstallableUnitType"/>– <xsd:element name="ConfigurationUnit" type="sdd-dd:ConfigurationUnitType"/>– <xsd:element name="LocalizationUnit" type="sdd-dd:LocalizationUnitType"/>– </xsd:choice>– <xsd:sequence maxOccurs="unbounded">– <xsd:element name="CompositeInstallable" type="sdd-dd:CompositeInstallableType"/>– </xsd:sequence>– </xsd:choice>– <xsd:element name="Requisites" type="sdd-dd:RequisitesType" minOccurs="0"/>– <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>– </xsd:sequence>– <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/>– <xsd:anyAttribute namespace="##other" processContents="lax"/>– </xsd:complexType>

• PackageDescriptor– <xsd:complexType name="PackageDescriptorType">– <xsd:sequence>– <xsd:element name="PackageIdentity" type="sdd-pd:PackageIdentityType"/>– <xsd:element name="Contents" type="sdd-pd:ContentsType"/>– <xsd:element ref="ds:Signature" minOccurs="0"/>– </xsd:sequence>– <xsd:attributeGroup ref="sdd-common:DescriptorInfoGroup"/>– <xsd:attribute name="descriptorLanguageBundle" type="xsd:token" use="optional"/>– <xsd:anyAttribute namespace="##other" processContents="lax"/>– </xsd:complexType>

Page 5: #N14 Pattern Value (aka Substring attribute)

Proposal (new)

• Both xpath and java’s regular expression support if more complex than what is needed.

• Thus, to keep it simple– Add an attribute that states what “format” the value of the element is:

• String (default)• Literal

– Case sensitive string

• Variable Reference– $(var) - reference

• Wildcard– * - wildcard– Prefer “*” over Java’s “.”

• Negation– Not required for we have the “test value” attribute

Page 6: #N14 Pattern Value (aka Substring attribute)

Proposed Schema Change

• The elements identified (circled in red) on the next few charts will be changed from type="sdd-dd:VariableExpressionType“ to type="sdd-dd:ElementValueType”

1. <xsd:complexType name=“ElementValueType">2. <xsd:simpleContent>3. <xsd:extension base="xsd:string">4. <xsd:attribute name=“pattern" type=“sdd-dd:StringPatternType" use="optional“ default=“string”/>5. </xsd:extension>6. </xsd:simpleContent>7. </xsd:complexType>

8. <xsd:simpleType name=“StringPatternType">9. <xsd:restriction base="xsd:string">10. <xsd:enumeration value=“string"/>11. <xsd:enumeration value=“literal"/>12. <xsd:enumeration value=“variableReference"/>13. <xsd:enumeration value=“wildcard"/>14. </xsd:restriction>15. </xsd:simpleType>

– Note: Allows for other types, e.g. pattern syntax, to be supported

Page 7: #N14 Pattern Value (aka Substring attribute)

Proposed Schema Change• The following could NOT be changed for they are attributes Thus, they are changed to an

xsd:string.

1. <xsd:complexType name="ArgumentType">

2. <xsd:attribute name="name" type=“xsd:string" use="required"/>

3. <xsd:attribute name="value" type=“xsd:string" use="optional"/>

4. <xsd:attribute name="required" type="xsd:boolean" use="optional" default="true"/>

5. <xsd:anyAttribute namespace="##other" processContents="lax"/>

6. </xsd:complexType>

7. <xsd:complexType name="ContentSelectionFeatureType">

8. <xsd:simpleContent>

9. <xsd:extension base="xsd:token">

10. <xsd:attribute name="selections" type=“xsd:string" use="optional"/>

11. </xsd:extension>

12. </xsd:simpleContent>

13. </xsd:complexType>

14. <xsd:complexType name="BaseParameterType">

15. <xsd:sequence>

16. <xsd:group ref="sdd-dd:DisplayElementGroup" minOccurs="0"/>

17. </xsd:sequence>

18. <xsd:attribute name="id" type="xsd:ID" use="required"/>

19. <xsd:attribute name="defaultValue" type=“xsd:string" use="optional"/>

20. <xsd:attribute name="sensitive" type="xsd:boolean" use="optional" default="false"/>

21. <xsd:attribute name="required" type="xsd:boolean" use="optional" default="true"/>

22. <xsd:attribute name="operation" type="sdd-dd:OperationListType" use="optional"/>

23. </xsd:complexType>

Page 8: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeTopology

Page 9: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeResource Constraints - (All places it applies)

Page 10: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to Change Resource Constraints - (All places it applies)

Page 11: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeResulting Resource

Page 12: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeResulting Change

Page 13: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeArtifacts

Note: Applies to all artifact types, e.g. UninstallArtifact

Page 14: #N14 Pattern Value (aka Substring attribute)

Proposed Elements to ChangeRequisites

Page 15: #N14 Pattern Value (aka Substring attribute)

Proposed Specification Change

• For the attributes on slide 5, the value should be handled as a literal string. The only exception is that if the value starts with “$(“ and ends with “)”, then the value should be treated as a variable reference.

Use this slide for full proposals. It is optional for general direction proposals and would not be expected to be complete.

Page 16: #N14 Pattern Value (aka Substring attribute)

Examples• Literal

– <sdd-dd:ResourceConstraint id="J2eeServletServer.check" resourceRef="J2eeServletServer">

– <sdd-dd:Name>Apache Tomcat</sdd-dd:Name>

• Variable Reference– <sdd-dd:Property>

– <sdd-dd:PropertyName>sp:CIM_ConnectedTo.Protocol</sdd-dd:PropertyName>

– <sdd-dd:Value pattern=“variableReference” >$(prototcolType)</sdd-dd:Value>

– </sdd-dd:Property>

– Literal would have been “JDBC”

• Wildcard– <sdd-dd:ResourceConstraint id="OracleDatabaseServer.check"

resourceRef="DatabaseServer">

– <sdd-dd:Name pattern=“wildcard” >Oracle*</sdd-dd:Name>

– Literal would have been “Oracle 9iAS”