blob: 23b948ffd8d7f73abb881a43157611361562c56c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://schemas.niku.com/2002/objectTypes" xmlns:srv="http://schemas.niku.com/2002/service" xmlns:sec="http://schemas.niku.com/2002/security" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.niku.com/2002/objectTypes" elementFormDefault="qualified">
<xsd:import namespace="http://schemas.niku.com/2002/service" schemaLocation="service-2002-02.xsd"/>
<xsd:import namespace="http://schemas.niku.com/2002/security" schemaLocation="security-2002-02.xsd"/>
<xsd:include schemaLocation="object-base-types-2003-09.xsd"/>
<xsd:include schemaLocation="common-2003-09.xsd"/>
<xsd:complexType name="AttributesType">
<xsd:sequence>
<xsd:element name="attribute" type="ObjectAttributeType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ObjectType">
<xsd:sequence>
<xsd:element name="nls" type="NlsType" maxOccurs="unbounded"/>
<xsd:element name="attributes" type="AttributesType"/>
<xsd:element name="tables" type="TablesType" minOccurs="0"/>
<xsd:element name="instanceService" type="srv:retrieveService" minOccurs="0"/>
<xsd:element name="listService" minOccurs="0">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="required">
<xsd:annotation>
<xsd:documentation xml:lang="en">The id of the system data provider to use as the objects list service</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="insertService" type="srv:processService" minOccurs="0"/>
<xsd:element name="updateService" type="srv:processService" minOccurs="0"/>
<xsd:element name="deleteService" type="srv:processService" minOccurs="0"/>
<xsd:element name="propertyViewService" type="srv:processService" minOccurs="0"/>
<xsd:element name="operations" type="OperationsType" minOccurs="0"/>
<xsd:element name="events" type="EventsType" minOccurs="0"/>
<xsd:element name="links" type="LinksType" minOccurs="0"/>
<xsd:element name="changeListeners" type="ChangeListenersType" minOccurs="0"/>
<xsd:element name="security" type="SecurityType" minOccurs="0"/>
<xsd:element name="subObject" type="SubObjectType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="component" type="xsd:string" use="optional"/>
<xsd:attribute name="code" type="xsd:string" use="required"/>
<xsd:attribute name="source" type="xsd:string" use="optional" default="customer"/>
<xsd:attribute name="parentCode" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">The code of the master object in a master sub relationship</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="topParentCode" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">If parentCode is specified, this attribute specifies the code of the top-most object in the hierarchy. If it is a simple parent-child relationship parentCode and topParentCode will be the same. If parentCode is not specified, topParentCode will also not be specified.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="parentReferenceAttribute" type="xsd:string" use="optional" default="odf_parent_id">
<xsd:annotation>
<xsd:documentation xml:lang="en">If parentCode is specified, this attribute specifies the attribute of this object that points to the parent instance. This attribute means nothing if parentCode is not specified</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="topParentReferenceAttribute" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">If parentCode is specified, this attribute specifies a peudo "attribute" that can be used as a filter to filter based on the top most object in an object hierarchy. It is constructed by concatenating (separated by the "-" character) the parentReferenceAttribute values while traversing the tree to the top. In the trivial case (one level) the value will be the same as parentReferenceAttribute. This attribute means nothing if parentCode is not specified</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="customizable" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="processEnabled" type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="raiseEvents" type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="rightsEnabled" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="rightCode" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">If specified means that this Object is instance rights-enabled.
This is the right_type from cmn_sec_groups.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="obsEnabled" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="obsTableNameKey" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">If specified means that this Object is OBS-enabled and the key provided matches entries in the PRJ_OBS_* tables.
This is the obs_code in odf_objects. Eventually this should go away in favor of using the object code directly.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="partitionModelCode" type="xsd:string" use="optional"/>
<xsd:attribute name="custom" type="xsd:boolean" use="optional" default="false">
<xsd:annotation>
<xsd:documentation xml:lang="en">True if the object is custom. I.e. it is not shipped with the application. As such this flag must not be used in an OMD object registration file. Objects registered that way are by definition not custom which is the default setting for the flag.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="id" type="xsd:integer" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">For internal use only.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="contextAttribute" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">The code of the attribute used for displaying the context of instances (think property page context).</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="idAttribute" type="xsd:string" default="code">
<xsd:annotation>
<xsd:documentation xml:lang="en">The code of the attribute that is the unique ID of instances, ie the unique_name for project or the company_id for comany.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="exportEnabled" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="copyEnabled" type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="viewAllEnabled" type="xsd:boolean" use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="FromSQLType">
<xsd:simpleContent>
<xsd:extension base="AugmentSQLType">
<xsd:attribute name="complete" type="xsd:boolean" default="false"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="SelectSQLType">
<xsd:simpleContent>
<xsd:extension base="AugmentSQLType">
<xsd:attribute name="oracleHint" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="TableType">
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="isPrimary" type="xsd:boolean"/>
<xsd:attribute name="pkColumn" type="xsd:string" use="required"/>
<xsd:attribute name="secondaryPkColumn" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:documentation xml:lang="en">For a non-primary table we allow a secondary column as part of the primary key. The secondaryPkColumn must be referenced in an attribute definition with a constant value. This is to support the principal_id, principal_type use case for a secondary base table (e.g. srm_contacts).</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="TablesType">
<xsd:sequence>
<xsd:element name="table" type="TableType" maxOccurs="unbounded"/>
<xsd:element name="select" type="SelectSQLType" minOccurs="0" maxOccurs="2"/>
<xsd:element name="from" type="FromSQLType" minOccurs="0" maxOccurs="2"/>
<xsd:element name="where" type="AugmentSQLType" minOccurs="0" maxOccurs="2"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ListenerType">
<xsd:annotation>
<xsd:documentation xml:lang="en">The fully qualified class name of a class implementing com.niku.union.odf.ObjectChangeListener interface. This class will be called when the Object changes in any way. E.g. a new custom attribute is added, a display mapping is changed...</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="className" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="ChangeListenersType">
<xsd:sequence>
<xsd:element name="listener" type="ListenerType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SecurityType">
<xsd:sequence>
<xsd:element name="viewAll" type="ViewRightType" minOccurs="0"/>
<xsd:element name="viewInstance" type="ViewRightType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SubObjectType">
<xsd:attribute name="code" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="ViewRightType">
<xsd:choice>
<xsd:element name="policy" type="sec:PolicyBaseType"/>
<xsd:element name="query" type="AugmentSQLType" minOccurs="0" maxOccurs="2"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="OperationsType">
<xsd:sequence>
<xsd:element name="operation" maxOccurs="unbounded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="OperationType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OperationType">
<xsd:sequence>
<xsd:element name="nls" type="NlsType"/>
<xsd:element name="service" type="srv:processService"/>
<xsd:element name="param" type="OperationParamType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required"/>
<xsd:attribute name="isInstance" type="xsd:boolean" default="true"/>
<xsd:attribute name="isSystem" type="xsd:boolean" default="false"/>
<xsd:attribute name="isTemplate" type="xsd:boolean" default="false"/>
<xsd:attribute name="isProcessable" type="xsd:boolean" default="false">
<xsd:annotation>
<xsd:documentation xml:lang="en">Flag that determines if the operation can be used to build a Process Engine condition.</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="OperationParamType">
<xsd:sequence>
<xsd:element name="nls" type="NlsType"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required"/>
<xsd:attribute name="dataType" type="DataType" use="required"/>
<xsd:attribute name="extendedType" type="ExtendedType"/>
<xsd:attribute name="processType" type="ProcessType"/>
<xsd:attribute name="lookupType" type="xsd:string"/>
<xsd:attribute name="required" type="xsd:boolean" default="false"/>
<xsd:attribute name="multiValued" type="xsd:boolean" default="false"/>
<xsd:attribute name="direction" type="DirectionType" default="IN"/>
<xsd:attribute name="dataLocation" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="EventsType">
<xsd:sequence>
<xsd:element name="event" maxOccurs="unbounded">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="EventType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EventType">
<xsd:sequence>
<xsd:element name="nls" type="NlsType"/>
</xsd:sequence>
<xsd:attribute name="code" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:schema>