Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
5417 lines (5244 sloc) 147 KB
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2">
<constants>
</constants>
<classes>
<class id="VLAN" _delta="delete"></class>
<class id="lnkSubnetToVLAN" _delta="delete"></class>
<class id="Subnet" _delta="delete"></class>
<class id="lnkPhysicalInterfaceToVLAN" _delta="delete"></class>
<class id="Patch" _delta="delete"></class>
<class id="lnkDocumentToPatch" _delta="delete"></class>
<class id="lnkSoftwareInstanceToSoftwarePatch" _delta="delete"></class>
<class id="lnkFunctionalCIToOSPatch" _delta="delete"></class>
<class id="PCSoftware" _delta="delete"></class>
<class id="OtherSoftware" _delta="delete"></class>
<class id="MiddlewareInstance" _delta="delete"></class>
<class id="DatabaseSchema" _delta="delete"></class>
<class id="Licence" _delta="delete"></class>
<class id="lnkDocumentToLicence" _delta="delete"></class>
<class id="Software" _delta="delete"></class>
<class id="WebServer" _delta="delete"></class>
<class id="SoftwareInstance" _delta="delete"></class>
<class id="lnkDocumentToSoftware" _delta="delete"></class>
<class id="WebApplication" _delta="delete"></class>
<class id="IOSVersion" _delta="delete"></class>
<class id="PhysicalInterface" _delta="delete"></class>
<class id="IPInterface" _delta="delete"></class>
<class id="NetworkInterface" _delta="delete"></class>
<class id="NetworkDevice" _delta="delete"></class>
<class id="lnkConnectableCIToNetworkDevice" _delta="delete"></class>
<class id="lnkApplicationSolutionToBusinessProcess" _delta="delete"></class>
<class id="Contact">
<fields>
<field id="applicationsolution_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkContactToApplicationSolution</linked_class>
<ext_key_to_me>contact_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>applicationsolution_id</ext_key_to_remote>
<duplicates/>
</field>
</fields>
<methods>
<method id="DoCheckToWrite" _delta="define">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function DoCheckToWrite()
{
parent::DoCheckToWrite();
// email has to be unique! Currently it' not possible to define this in datamodel (xml)
$finalclass = $this->Get('finalclass');
$myContactId = UserRights::GetContactId();
if($this->GetKey() != $myContactId && !UserRights::IsAdministrator())
{
$this->m_aCheckIssues[] = Dict::Format("Class:Person/Error:CanOnlyUpdateYourself", $myContactId);
}
$aChanges = $this->ListChanges();
if (array_key_exists('email', $aChanges))
{
$sContact = $aChanges['email'];
if($sContact == "")
{
return true;
}
$oSearch = DBObjectSearch::FromOQL_AllData("SELECT Contact WHERE email=:email");
$oSet = new DBObjectSet($oSearch, array(), array('email' => $sContact));
if ($oSet->Count() > 0)
{
$this->m_aCheckIssues[] = Dict::Format("Class:Contact/Error:ContactEmailMustBeUnique", $sContact);
}
}
if($finalclass == "Team" && array_key_exists('name', $aChanges))
{
$sName = $aChanges['name'];
$oSearch = DBObjectSearch::FromOQL_AllData("SELECT $finalclass WHERE name=:name");
$oSet = new DBObjectSet($oSearch, array(), array('name' => $sName));
if ($oSet->Count() > 0)
{
$this->m_aCheckIssues[] = Dict::Format("Class:$finalclass/Error:$finalclass" . "NameMustBeUnique", $sName);
}
}
}]]>
</code>
</method>
</methods>
</class>
<class id="Person">
<properties>
<naming _delta="redefine">
<attributes>
<attribute id="first_name"/>
<attribute id="name"/>
<attribute id="login"/>
</attributes>
</naming>
<reconciliation>
<attributes _delta="redefine">
<attribute id="name"/>
<attribute id="first_name"/>
<attribute id="org_id"/>
<attribute id="org_name"/>
<attribute id="email"/>
<attribute id="phone"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="location_id" _delta="delete"></field>
<field id="location_name" _delta="delete"></field>
<field id="employee_number" _delta="delete"></field>
<field id="mobile_phone" _delta="delete"></field>
<field id="login" xsi:type="AttributeString" _delta="define">
<sql>login</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
</fields>
<presentation>
<details>
<items>
<item id="applicationsolution_list" _delta="define">
<rank>15</rank>
</item>
<item id="col:col1">
<items>
<item id="fieldset:Person:info">
<items>
<item id="location_id" _delta="delete"></item>
<item id="employee_number" _delta="delete"></item>
</items>
</item>
</items>
</item>
<item id="col:col2">
<rank>50</rank>
<items>
<item id="fieldset:Person:notifiy">
<rank>10</rank>
<items>
<item id="mobile_phone" _delta="delete"></item>
</items>
</item>
</items>
</item>
</items>
</details>
<search>
<items>
<item id="location_id" _delta="delete"></item>
<item id="employee_number" _delta="delete"></item>
<item id="phone" _delta="delete"></item>
<item id="email" _delta="redefine">
<rank>10</rank>
</item>
<item id="friendlyname" _delta="define">
<rank>15</rank>
</item>
<item id="first_name" _delta="delete">
<rank>20</rank>
</item>
<item id="name" _delta="delete">
<rank>30</rank>
</item>
<item id="org_id" _delta="redefine">
<rank>40</rank>
</item>
<item id="status" _delta="redefine">
<rank>60</rank>
</item>
<item id="manager_id">
<rank>90</rank>
</item>
<item id="mobile_phone" _delta="delete"></item>
<item id="notify" _delta="redefine">
<rank>110</rank>
</item>
</items>
</search>
<list>
<items>
<item id="location_id" _delta="delete"></item>
<item id="email" _delta="redefine">
<rank>10</rank>
</item>
<item id="phone" _delta="redefine">
<rank>20</rank>
</item>
<item id="status" _delta="redefine">
<rank>30</rank>
</item>
<item id="org_id" _delta="redefine">
<rank>40</rank>
</item>
<item id="first_name" _delta="delete"></item>
</items>
</list>
</presentation>
<methods>
<method id="DoCheckToWrite" _delta="define">
<static>false</static>
<access>public</access>
<type>Overload-DBObject</type>
<code><![CDATA[
public function DoCheckToWrite()
{
parent::DoCheckToWrite();
// 填充login字段
$login = preg_replace("/@.*/","",$this->Get("email"));
$this->Set("login", $login);
}
]]>
</code>
</method>
</methods>
</class>
<class id="Team">
<presentation>
<details>
<items>
<item id="applicationsolution_list" _delta="define">
<rank>85</rank>
</item>
</items>
</details>
</presentation>
<relations>
<relation id="impacts" _delta="define">
<neighbours>
<neighbour id="person">
<attribute>persons_list</attribute>
</neighbour>
</neighbours>
</relation>
</relations>
</class>
<class id="Location">
<properties>
<reconciliation>
<attributes _delta="redefine">
<attribute id="name"/>
<attribute id="isp_id"/>
<attribute id="isp_name"/>
</attributes>
</reconciliation>
<icon _delta="redefine">../le-config-mgmt/images/idc.png</icon>
</properties>
<fields>
<field id="isp_id" xsi:type="AttributeExternalKey" _delta="define">
<sql>isp_id</sql>
<target_class>ISP</target_class>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
</field>
<field id="isp_name" xsi:type="AttributeExternalField" _delta="define">
<extkey_attcode>isp_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="org_id" _delta="delete"></field>
<field id="org_name" _delta="delete"></field>
<field id="postal_code" _delta="delete"></field>
<field id="person_list" _delta="delete"></field>
<field id="physicaldevice_list" _delta="delete"></field>
<field id="server_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>Server</linked_class>
<ext_key_to_me>location_id</ext_key_to_me>
<edit_mode>add_only</edit_mode>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
<field id="rack_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>Rack</linked_class>
<ext_key_to_me>location_id</ext_key_to_me>
<edit_mode>add_only</edit_mode>
<count_min>0</count_min>
<count_max>0</count_max>
</field>
</fields>
<presentation>
<details>
<items>
<item id="isp_id">
<rank>30</rank>
</item>
<item id="org_id" _delta="delete"></item>
<item id="postal_code" _delta="delete"></item>
<item id="person_list" _delta="delete"></item>
<item id="physicaldevice_list" _delta="delete"></item>
<item id="server_list">
<rank>90</rank>
</item>
<item id="rack_list">
<rank>100</rank>
</item>
</items>
</details>
<search>
<items>
<item id="isp_id">
<rank>30</rank>
</item>
<item id="org_id" _delta="delete"></item>
<item id="postal_code" _delta="delete"></item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="isp_id">
<rank>10</rank>
</item>
<item id="city">
<rank>30</rank>
</item>
<item id="country">
<rank>40</rank>
</item>
<item id="status">
<rank>50</rank>
</item>
</items>
</list>
</presentation>
<relations _delta="define">
<relation id="impacts">
<neighbours>
<neighbour id="server">
<attribute>server_list</attribute>
</neighbour>
<neighbour id="rack">
<attribute>rack_list</attribute>
</neighbour>
</neighbours>
</relation>
</relations>
</class>
<class id="FunctionalCI">
<properties>
<reconciliation _delta="redefine">
<attributes>
<attribute id="name"/>
<attribute id="friendlyname"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
<attribute id="finalclass"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="name" xsi:type="AttributeString" _delta="redefine">
<sql>name</sql>
<default_value>CI名称不能重复</default_value>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="business_criticity" xsi:type="AttributeEnum" _delta="redefine">
<values>
<value id="high">high</value>
<value id="medium">medium</value>
<value id="low">low</value>
<value id="null">null</value>
</values>
<sql>business_criticity</sql>
<default_value>null</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="ci_id" xsi:type="AttributeInteger" _delta="define">
<sql>ci_id</sql>
<default_value>1</default_value>
<is_null_allowed>true</is_null_allowed>
</field>
<!--根据lnkContactToFunctionalCI更新此字段-->
<field id="contacts" xsi:type="AttributeString" _delta="define">
<sql>contacts</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
</fields>
<methods>
<method id="DoCheckToWrite" _delta="define">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function DoCheckToWrite()
{
parent::DoCheckToWrite();
$ci_id = $this->GetKey();
if(!$ci_id)
{
$this->Set('ci_id',time());
}else
{
$this->Set('ci_id',$ci_id);
}
$finalclass = $this->Get('finalclass');
/* all_ip基于PhysicalIP类的变化,这里无需处理
if($finalclass == "Server")
{
$ip_list = $this->GetAsCSV("ip_list");
$ip_arr = explode("|", $ip_list);
foreach($ip_arr as $key => $value){
$oArr = explode(";", $value);
$ip_arr[$key] = $oArr[1] . "-" . $oArr[0];
$ip_arr[$key] = preg_replace("/[':\"]|ipaddress|type/", "", $ip_arr[$key]);
}
$all_ip = implode(";", $ip_arr);
//print_r($all_ip);
$this->Set("all_ip", $all_ip);
}*/
// friendlyname of FunctionalCI has to be unique! Currently it' not possible to define this in datamodel (xml)
$nameSpec = MetaModel::GetNameSpec(get_class($this));
$sFormat = preg_replace('/%[1-9]\$s/', '%s', $nameSpec['0']);
$sArg = $nameSpec['1'];
$oArg = array();
/*
* 如果组成friendlyname的所有attribute都没有发生变化,那么不进行检查
* 如果不监听变化就进行检查,将导致对象无法更新
* server不适用name作为friendlyname,如果finalclass是Server,同时检查name和friendlyname
*/
// 需要用name作为唯一性校验的Class
$UniqNameClass = array("Server", "ApplicationSolution");
$aChanges = $this->ListChanges();
if(in_array($finalclass,$UniqNameClass) && array_key_exists('name', $aChanges))
{
$sServer = $aChanges['name'];
$oSearch = DBObjectSearch::FromOQL_AllData("SELECT Server WHERE name=:name");
$oSet = new DBObjectSet($oSearch, array(), array('name' => $sServer));
if ($oSet->Count() > 0)
{
$this->m_aCheckIssues[] = Dict::Format("Class:".$finalclass."/Error:".$finalclass."MustBeUnique", $sServer);
}
}
$isChanges = false;
foreach($aChanges as $key=>$value)
{
if(MetaModel::IsValidKeyAttCode($finalclass, $key))
{
$extKeyFriends = MetaModel::GetExtKeyFriends($finalclass, $key);
foreach($extKeyFriends as $k=>$v)
{
if(in_array($k, $sArg))
{
$isChanges = true;
}
}
}
if(in_array($key, $sArg))
{
$isChanges = true;
}
}
foreach($sArg as $value) {
array_push($oArg, $this->Get($value));
}
$sFunctionalCI = vsprintf("$sFormat", $oArg);
//print_r($this->Get('name') . "<br>");
//print_r($this->Get('friendlyname') . "<br>");
//print_r($oArg);
//print_r("<br>");
if($isChanges) {
$oSearch = DBObjectSearch::FromOQL_AllData("SELECT $finalclass WHERE friendlyname=:friendlyname");
$oSet = new DBObjectSet($oSearch, array(), array('friendlyname' => $sFunctionalCI));
if ($oSet->Count() > 0)
{
$this->m_aCheckIssues[] = Dict::Format("Class:".$finalclass."/Error:".$finalclass."MustBeUnique", $sFunctionalCI);
}
}
}]]></code>
</method>
</methods>
<relations>
<relation id="impacts">
<neighbours>
<neighbour id="softwareinstance" _delta="delete"></neighbour>
</neighbours>
</relation>
</relations>
</class>
<class id="BusinessProcess">
<properties>
<icon _delta="redefine">../le-config-mgmt/images/business1.png</icon>
</properties>
<fields>
<field id="applicationsolutions_list" xsi:type="AttributeLinkedSet" _delta="redefine">
<linked_class>ApplicationSolution</linked_class>
<ext_key_to_me>businessprocess_id</ext_key_to_me>
</field>
</fields>
<presentation>
<details>
<items>
<item id="contacts_list" _delta="redefine">
<rank>80</rank>
</item>
<item id="documents_list" _delta="redefine">
<rank>100</rank>
</item>
<item id="applicationsolutions_list" _delta="redefine">
<rank>70</rank>
</item>
</items>
</details>
</presentation>
</class>
<class id="ApplicationSolution">
<properties>
<naming>
<attributes _delta="redefine">
<attribute id="businessprocess_name"/>
<attribute id="name"/>
</attributes>
</naming>
<icon _delta="redefine">../le-config-mgmt/images/app.png</icon>
</properties>
<fields>
<field id="businessprocess_id" xsi:type="AttributeExternalKey" _delta="define">
<sql>businessprocess_id</sql>
<target_class>BusinessProcess</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
</field>
<field id="businessprocess_name" xsi:type="AttributeExternalField" _delta="define">
<extkey_attcode>businessprocess_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="contact_list_custom" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkContactToApplicationSolution</linked_class>
<ext_key_to_me>applicationsolution_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>contact_id</ext_key_to_remote>
<duplicates/>
</field>
<field id="name_cn" xsi:type="AttributeString" _delta="define">
<sql>name_cn</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="url_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>Url</linked_class>
<ext_key_to_me>applicationsolution_id</ext_key_to_me>
</field>
<field id="status" xsi:type="AttributeEnum" _delta="redefine">
<values>
<value id="production">production</value>
<value id="implementation">implementation</value>
<value id="stock">stock</value>
<value id="obsolete">obsolete</value>
</values>
<sql>status</sql>
<default_value>production</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="type" xsi:type="AttributeEnum" _delta="define">
<values>
<value id="web">web</value>
<value id="other">other</value>
<value id="shadowlink">shadowlink</value>
</values>
<sql>type</sql>
<default_value>web</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
</fields>
<presentation>
<details>
<items>
<item id="contacts_list" _delta="delete"></item>
<item id="contact_list_custom" _delta="define">
<rank>70</rank>
</item>
<item id="url_list" _delta="define">
<rank>80</rank>
</item>
<item id="name_cn" _delta="define">
<rank>15</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="businessprocess_id" _delta="define">
<rank>16</rank>
</item>
</items>
</details>
<search>
<items>
<item id="name_cn" _delta="define">
<rank>15</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="status" _delta="define">
<rank>20</rank>
</item>
<item id="businessprocess_id" _delta="define">
<rank>16</rank>
</item>
</items>
</search>
<list>
<items>
<item id="name_cn" _delta="define">
<rank>5</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="status" _delta="define">
<rank>10</rank>
</item>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="businessprocess_id" _delta="define">
<rank>6</rank>
</item>
</items>
</list>
</presentation>
<relations>
<relation id="impacts">
<neighbours>
<neighbour id="businessprocess" _delta="redefine">
<attribute>businessprocess_id</attribute>
</neighbour>
<neighbour id="contact_custom" _delta="define">
<attribute>contact_list_custom</attribute>
</neighbour>
</neighbours>
</relation>
</relations>
<methods>
<method id="isAllowedCreationCustom" _delta="define">
<static>false</static>
<access>public</access>
<type>Custom</type>
<code><![CDATA[
public function isAllowedCreationCustom()
{
if($this->IsNew() && !UserRights::IsAdministrator())
{
return(false);
}else
{
return(true);
}
}
]]>
</code>
</method>
<method id="isAllowedModifyCustom" _delta="define">
<static>false</static>
<access>public</access>
<type>Custom</type>
<code><![CDATA[
public function isAllowedModifyCustom()
{
$iKey = $this->GetKey();
// 由于iTop不区分新建和修改(统一为写权限),下面的if代码可以替代 isAllowedCreationCustom 函数;
// 但是考虑到无新建和修改权限的提示信息不一样,所以还是区别对待(首先判断有没有新建权限,然后判断有没有修改权限)
if($iKey <= 0 && !UserRights::IsAdministrator())
{
return(false);
}
$iObj = NULL;
$iUserID = UserRights::GetContactId();
// 新建时会出现iKey小于0报错的情况,所以这里强制iKey大于0才执行查询,否则iObj保持原值(NULL)
if($iUserID>0 && $iKey>0)
{
$oql = "SELECT lnkContactToApplicationSolution AS l WHERE l.contact_id = $iUserID AND l.applicationsolution_id = $iKey";
$iObj = MetaModel::GetObjectFromOQL($oql);
}
if (!$iObj && !UserRights::IsAdministrator() && !UserRights::HasProfile("产品经理"))
{
return(false);
}else
{
return(true);
}
}
]]>
</code>
</method>
<method id="ReloadAndDisplayCustom" _delta="define">
<static>false</static>
<access>public</access>
<type>Custom</type>
<code><![CDATA[
function ReloadAndDisplayCustom($oPage, $oObj, $sMessageId = '', $sMessage = '', $sSeverity = null)
{
$oAppContext = new ApplicationContext();
if ($sMessageId != '')
{
cmdbAbstractObject::SetSessionMessage(get_class($oObj), $oObj->GetKey(), $sMessageId, $sMessage, $sSeverity, 0, true /* must not exist */);
}
$oId = $oObj->getKey();
$oPage->add_header('Location: '.utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=details&class='.get_class($oObj).'&id='.$oId.'&'.$oAppContext->GetForLink());
}
]]>
</code>
</method>
<method id="DisplayModifyForm" _delta="define">
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[
public function DisplayModifyForm(WebPage $oPage, $aExtraParams = array())
{
if(!self::isAllowedCreationCustom())
{
$sMesg = Dict::Format("Class:ApplicationSolution/Error:NotAllowNew", get_class($this));
$sMesg = $sMesg . "...<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?c%5Bmenu%5D=ApplicationSolution\">" . Dict::Format("Class:ApplicationSolution/Msg:ReturnList")."</a>";
$oPage->add("<div class=\"header_message message_info\">$sMesg</div>\n");
//self::ReloadAndDisplayCustom($oPage, $this, 'app-create-not-allowd', $sMesg, 'info');
}elseif(!self::isAllowedModifyCustom())
{
$sMesg = Dict::Format("Class:ApplicationSolution/Error:CanOnlyUpdateAppYourself", $this->Get('friendlyname'));
//$oPage->add("<div class=\"header_message message_info\">$sMesg</div>\n");
self::ReloadAndDisplayCustom($oPage, $this, 'app-modify-not-allowd', $sMesg, 'info');
}
else
{
parent::DisplayModifyForm($oPage, $aExtraParams);
}
}
]]>
</code>
</method>
<method id="DisplayBareRelations" _delta="define">
<static>false</static>
<access>public</access>
<type>Overload-cmdbAbstractObject</type>
<code><![CDATA[ public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
{
parent::DisplayBareRelations($oPage, $bEditMode);
$grafana = trim(MetaModel::GetModuleSetting('le-config-mgmt', 'grafana_app_url', 'http://localhost/'));
$app = $this->Get('name');
$tabUrl = $grafana . "?var-app=$app.8080";
$iframe_start = '<iframe style="border:0;padding:0;margin:0;width:100%;height:500px;overflow:auto" ';
$iframe_end = '</iframe></div>';
$addStr = $iframe_start . 'src=' . '"' . $tabUrl . '"' . '>' . $iframe_end;
if (!$bEditMode)
{
$oPage->SetCurrentTab('监控');
$oPage->add('<div id="grafana_app_url" style="width:100%;height:500px;">');
$oPage->add($addStr);
}
}]]></code>
</method>
<method id="GetAttributeFlags" _delta="define">
<static>false</static>
<access>public</access>
<type>Overload-iDisplay</type>
<code><![CDATA[
// 用DisplayModifyForm控制页面跳转,配合DoCheckToWrite已经能很好的保证权限控制。
// GetAttributeFlags已经不会起作用了。保留作为其他场景下的参考代码。
// 2016.10.9 更新: 不允许修改app名称,如果不是新建app,则name字段只读
// 2017.1.4 更新: 不允许非管理员修改app优先级
// 2017.1.13 更新: 允许app负责人修改app优先级
public function GetAttributeFlags($sAttCode, &$aReasons = array(), $sTargetState = '')
{
if (!$this->IsNew() && $sAttCode=="name")
{
return OPT_ATT_READONLY;
}
elseif (!self::isAllowedModifyCustom())
{
return OPT_ATT_READONLY;
}
else
{
return parent::GetAttributeFlags($sAttCode, $aReasons, $sTargetState);
}
}
]]>
</code>
</method>
<method id="DoCheckToWrite" _delta="define">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function DoCheckToWrite()
{
parent::DoCheckToWrite();
if(!self::isAllowedCreationCustom())
{
$this->m_aCheckIssues[] = Dict::Format("Class:ApplicationSolution/Error:NotAllowNew");
}
if(!self::isAllowedModifyCustom())
{
$this->m_aCheckIssues[] = Dict::Format("Class:ApplicationSolution/Error:CanOnlyUpdateAppYourself", $this->Get('friendlyname'));
}
}
]]>
</code>
</method>
</methods>
</class>
<class id="PhysicalDevice">
<fields>
<field id="hostname" xsi:type="AttributeString" _delta="define">
<sql>hostname</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
<field id="location_id" xsi:type="AttributeExternalKey" _delta="redefine">
<sql>location_id</sql>
<target_class>Location</target_class>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_MANUAL</on_target_delete>
<allow_target_creation>false</allow_target_creation>
</field>
</fields>
<presentation>
<list>
<items>
<item id="serialnumber" _delta="delete"></item>
<item id="brand_id" _delta="delete"></item>
<item id="business_criticity" _delta="delete"></item>
</items>
</list>
</presentation>
</class>
<class id="Server">
<properties>
<naming _delta="redefine">
<attributes>
<attribute id="hostname"/>
</attributes>
</naming>
<reconciliation _delta="redefine">
<attributes>
<attribute id="name"/>
<attribute id="hostname"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="cluster_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkServerToCluster</linked_class>
<ext_key_to_me>server_id</ext_key_to_me>
<ext_key_to_remote>cluster_id</ext_key_to_remote>
<count_max>0</count_max>
<count_min>0</count_min>
<duplicates/>
</field>
<field id="vip_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkServerToVirtualIP</linked_class>
<ext_key_to_me>server_id</ext_key_to_me>
<ext_key_to_remote>vip_id</ext_key_to_remote>
<count_max>0</count_max>
<count_min>0</count_min>
<duplicates/>
</field>
<field id="middleware_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkMiddlewareToServer</linked_class>
<ext_key_to_me>server_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>middleware_id</ext_key_to_remote>
<duplicates/>
</field>
<field id="ip_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>PhysicalIP</linked_class>
<ext_key_to_me>connectableci_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<duplicates/>
</field>
<field id="all_ip" xsi:type="AttributeString" _delta="define">
<sql>all_ip</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
</fields>
<presentation>
<details>
<items>
<item id="providercontracts_list" _delta="delete"></item>
<item id="services_list" _delta="delete"></item>
<item id="ip_list" _delta="define">
<rank>4</rank>
</item>
<item id="cluster_list" _delta="define">
<rank>5</rank>
</item>
<item id="vip_list" _delta="define">
<rank>6</rank>
</item>
<item id="middleware_list">
<rank>8</rank>
</item>
<item id="documents_list" _delta="redefine">
<rank>100</rank>
</item>
<item id="col:col1">
<rank>120</rank>
<items>
<item id="fieldset:Server:baseinfo" _delta="redefine">
<rank>10</rank>
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="hostname">
<rank>20</rank>
</item>
<item id="org_id">
<rank>30</rank>
</item>
<item id="status">
<rank>40</rank>
</item>
<item id="business_criticity">
<rank>50</rank>
</item>
<item id="cpu">
<rank>80</rank>
</item>
<item id="ram">
<rank>90</rank>
</item>
</items>
</item>
<item id="fieldset:Server:moreinfo" _delta="redefine">
<rank>20</rank>
<items>
<item id="location_id">
<rank>60</rank>
</item>
<item id="rack_id">
<rank>61</rank>
</item>
<item id="brand_id">
<rank>10</rank>
</item>
<item id="model_id">
<rank>20</rank>
</item>
<item id="osfamily_id">
<rank>30</rank>
</item>
<item id="osversion_id">
<rank>40</rank>
</item>
<item id="oslicence_id">
<rank>50</rank>
</item>
</items>
</item>
</items>
</item>
<item id="col:col2">
<rank>130</rank>
<items>
<item id="fieldset:Server:Date">
<rank>10</rank>
<items>
<item id="move2production">
<rank>10</rank>
</item>
<item id="purchase_date">
<rank>20</rank>
</item>
<item id="end_of_warranty">
<rank>30</rank>
</item>
</items>
</item>
<item id="fieldset:Server:power" _delta="delete"></item>
<item id="fieldset:Server:otherinfo">
<rank>30</rank>
<items>
<item id="description">
<rank>10</rank>
</item>
</items>
</item>
</items>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>1</rank>
</item>
<item id="hostname">
<rank>20</rank>
</item>
<item id="all_ip">
<rank>25</rank>
</item>
<item id="org_id">
<rank>30</rank>
</item>
<item id="status">
<rank>40</rank>
</item>
<item id="business_criticity">
<rank>50</rank>
</item>
<item id="location_id">
<rank>51</rank>
</item>
<item id="rack_id">
<rank>52</rank>
</item>
<item id="managementip">
<rank>55</rank>
</item>
<item id="brand_id">
<rank>60</rank>
</item>
<item id="model_id">
<rank>70</rank>
</item>
<item id="move2production">
<rank>120</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="all_ip">
<rank>25</rank>
</item>
<item id="cpu">
<rank>3</rank>
</item>
<item id="ram">
<rank>5</rank>
</item>
<item id="status">
<rank>21</rank>
</item>
<item id="rack_id">
<rank>40</rank>
</item>
<item id="model_id">
<rank>60</rank>
</item>
<item id="org_id">
<rank>70</rank>
</item>
</items>
</list>
</presentation>
<relations>
<relation id="impacts" _delta="define">
<neighbours>
<neighbour id="cluster">
<attribute>cluster_list</attribute>
</neighbour>
<neighbour id="middleware_list" _delta="define">
<attribute>middleware_list</attribute>
</neighbour>
</neighbours>
</relation>
</relations>
</class>
<class id="IPAddress" _delta="define">
<parent>cmdbAbstractObject</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>true</abstract>
<key_type>autoincrement</key_type>
<db_table>ipaddress</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field>finalclass</db_final_class_field>
<naming>
<attributes>
<attribute id="ipaddress"/>
</attributes>
</naming>
<display_template/>
<icon>images/interface.png</icon>
<reconciliation>
<attributes>
<attribute id="ipaddress"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="ipaddress" xsi:type="AttributeIPAddress">
<sql>ipaddress</sql>
<default_value/>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="type" xsi:type="AttributeEnum">
<values>
<value id="int">int</value>
<value id="ext">ext</value>
<value id="oob">oob</value>
</values>
<sql>type</sql>
<default_value>int</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="comment" xsi:type="AttributeText">
<sql>comment</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
</fields>
<methods>
<method id="DoCheckToWrite" _delta="define">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[ public function DoCheckToWrite()
{
parent::DoCheckToWrite();
// ipaddress has to be unique! Currently it' not possible to define this in datamodel (xml)
$aChanges = $this->ListChanges();
if (array_key_exists('ipaddress', $aChanges))
{
$sIPAddress = $aChanges['ipaddress'];
$oSearch = DBObjectSearch::FromOQL_AllData("SELECT IPAddress WHERE ipaddress=:ipaddress");
$oSet = new DBObjectSet($oSearch, array(), array('ipaddress' => $sIPAddress));
if ($oSet->Count() > 0)
{
$this->m_aCheckIssues[] = Dict::Format("Class:IPAddress/Error:IPAddressMustBeUnique", $sIPAddress);
}
}
$finalclass = $this->Get('finalclass');
if($finalclass == "PhysicalIP" && count($aChanges)>0)
{
$connectableci_id = $this->Get('connectableci_id');
if($this->IsNew()){
$newIP = $aChanges['type'] . "-" . $aChanges['ipaddress'];
$old_connectableci_id = $connectableci_id;
}
else{
$old_connectableci_id = $this->GetOriginal('connectableci_id');
$this->DBWrite();
}
//$str = $old_connectableci_id . "#" . $connectableci_id;
//$this->m_aCheckIssues[] = Dict::Format("Class:IPAddress/Error:ID", $str);
$nSearch = DBObjectSearch::FromOQL_AllData("SELECT PhysicalIP WHERE connectableci_id=:connectableci_id");
//connectableci_id 变化时,需要更新原connectableci_id设备的all_ip
if($old_connectableci_id != $connectableci_id) {
$oSet = new DBObjectSet($nSearch, array(), array('connectableci_id' => $old_connectableci_id));
$oArray = $oSet->ToArrayOfValues();
$oips = array();
foreach($oArray as $value) {
array_push($oips, $value['PhysicalIP.type'] . "-" . $value['PhysicalIP.ipaddress']);
}
$oipStr = implode(";", $oips);
$oS = MetaModel::GetObjectByColumn("Server", "id", $old_connectableci_id);
$oS->Set("all_ip", $oipStr);
$oS->DBWrite();
//print_r($oS->GetAsCSV("all_ip"));
}
$nSet = new DBObjectSet($nSearch, array(), array('connectableci_id' => $connectableci_id));
$nArray = $nSet->ToArrayOfValues();
$ips = array();
if(isset($newIP)){
array_push($ips, $newIP);
}
foreach($nArray as $value) {
array_push($ips, $value['PhysicalIP.type'] . "-" . $value['PhysicalIP.ipaddress']);
}
$aS = MetaModel::GetObjectByColumn("Server", "id", $connectableci_id);
$ipStr = implode(";", array_unique($ips));
$aS->Set("all_ip", $ipStr);
//$aS->UpdateObjectFromArray(array("all_ip" => $ips));
//print_r($aS->GetAsCSV("all_ip"));
$aS->DBWrite();
}
}]]>
</code>
</method>
</methods>
<presentation>
<details>
<items>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="comment">
<rank>40</rank>
</item>
</items>
</details>
<search>
<items>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="comment">
<rank>40</rank>
</item>
</items>
</search>
<list>
<items>
<item id="type">
<rank>15</rank>
</item>
<item id="comment">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="PhysicalIP" _delta="define">
<parent>IPAddress</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>physicalip</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes>
<attribute id="ipaddress"/>
</attributes>
</naming>
<display_template/>
<icon>images/interface.png</icon>
<reconciliation>
<attributes>
<attribute id="ipaddress"/>
<attribute id="connectableci_id"/>
<attribute id="connectableci_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="connectableci_id" xsi:type="AttributeExternalKey">
<sql>connectableci_id</sql>
<target_class>ConnectableCI</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
</field>
<field id="connectableci_name" xsi:type="AttributeExternalField">
<extkey_attcode>connectableci_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
</fields>
<methods></methods>
<presentation>
<details>
<items>
<item id="connectableci_id">
<rank>20</rank>
</item>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="comment">
<rank>50</rank>
</item>
</items>
</details>
<search>
<items>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="connectableci_id">
<rank>15</rank>
</item>
</items>
</search>
<list>
<items>
<item id="ipaddress">
<rank>5</rank>
</item>
<item id="type">
<rank>10</rank>
</item>
<item id="connectableci_id">
<rank>20</rank>
</item>
<item id="comment">
<rank>30</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="VirtualIP" _delta="define">
<parent>IPAddress</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>virtualip</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes>
<attribute id="ipaddress"/>
</attributes>
</naming>
<display_template/>
<icon>images/interface.png</icon>
<reconciliation>
<attributes>
<attribute id="ipaddress"/>
<attribute id="connectableci_id"/>
<attribute id="connectableci_name"/>
<attribute id="isp_id"/>
<attribute id="isp_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="connectableci_id" xsi:type="AttributeExternalKey">
<sql>connectableci_id</sql>
<target_class>Cluster</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
</field>
<field id="connectableci_name" xsi:type="AttributeExternalField">
<extkey_attcode>connectableci_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="isp_id" xsi:type="AttributeExternalKey">
<sql>isp_id</sql>
<target_class>ISP</target_class>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
</field>
<field id="isp_name" xsi:type="AttributeExternalField">
<extkey_attcode>isp_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="server_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkServerToVirtualIP</linked_class>
<ext_key_to_me>vip_id</ext_key_to_me>
<ext_key_to_remote>server_id</ext_key_to_remote>
<count_max>0</count_max>
<count_min>0</count_min>
<duplicates/>
</field>
</fields>
<methods></methods>
<presentation>
<details>
<items>
<item id="server_list" _delta="define">
<rank>10</rank>
</item>
<item id="connectableci_id">
<rank>20</rank>
</item>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="isp_id">
<rank>30</rank>
</item>
<item id="comment">
<rank>50</rank>
</item>
</items>
</details>
<search>
<items>
<item id="ipaddress">
<rank>10</rank>
</item>
<item id="type">
<rank>15</rank>
</item>
<item id="connectableci_id">
<rank>20</rank>
</item>
<item id="isp_id">
<rank>30</rank>
</item>
</items>
</search>
<list>
<items>
<item id="ipaddress">
<rank>5</rank>
</item>
<item id="type">
<rank>10</rank>
</item>
<item id="connectableci_id">
<rank>11</rank>
</item>
<item id="isp_id">
<rank>20</rank>
</item>
<item id="comment">
<rank>30</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Domain" _delta="define">
<parent>FunctionalCI</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>domain</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/domain.png</icon>
<reconciliation>
<attributes _delta="redefine">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="status" xsi:type="AttributeEnum">
<values>
<value id="production">production</value>
<value id="implementation">implementation</value>
<value id="stock">stock</value>
<value id="obsolete">obsolete</value>
</values>
<sql>status</sql>
<default_value>production</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="record_id" xsi:type="AttributeExternalKey" _delta="define">
<sql>record_id</sql>
<is_null_allowed>true</is_null_allowed>
<on_target_delete>DEL_AUTO</on_target_delete>
<target_class>Cluster</target_class>
<filter>SELECT Cluster AS c WHERE c.type = 'Router'</filter>
</field>
<field id="record_name" xsi:type="AttributeExternalField" _delta="define">
<extkey_attcode>record_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
</fields>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="record_id" _delta="define">
<rank>16</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="record_id" _delta="define">
<rank>16</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="record_id" _delta="define">
<rank>16</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Cluster" _delta="define">
<parent>FunctionalCI</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>cluster</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/cluster.png</icon>
<reconciliation>
<attributes>
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="status" xsi:type="AttributeEnum">
<values>
<value id="production">production</value>
<value id="implementation">implementation</value>
<value id="stock">stock</value>
<value id="obsolete">obsolete</value>
</values>
<sql>status</sql>
<default_value>production</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="server_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkServerToCluster</linked_class>
<ext_key_to_me>cluster_id</ext_key_to_me>
<ext_key_to_remote>server_id</ext_key_to_remote>
<count_max>0</count_max>
<count_min>0</count_min>
<duplicates/>
</field>
<field id="vip_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>VirtualIP</linked_class>
<ext_key_to_me>connectableci_id</ext_key_to_me>
<edit_mode>add_only</edit_mode>
<count_min>0</count_min>
<count_max>0</count_max>
<duplicates/>
</field>
<field id="type" xsi:type="AttributeEnum" _delta="define">
<values>
<value id="compute">Compute</value>
<value id="router">Router</value>
<value id="dev">Dev</value>
<value id="qa">QA</value>
<value id="ops">OPS</value>
</values>
<sql>type</sql>
<default_value>OPS</default_value>
</field>
<field id="domain_list" xsi:type="AttributeLinkedSet" _delta="define">
<linked_class>Domain</linked_class>
<ext_key_to_me>record_id</ext_key_to_me>
<edit_mode>add_only</edit_mode>
<count_max>0</count_max>
<count_min>0</count_min>
<duplicates/>
</field>
<field id="cname" xsi:type="AttributeString" _delta="define">
<sql>cname</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
</field>
</fields>
<methods/>
<presentation>
<details>
<items>
<item id="vip_list" _delta="define">
<rank>5</rank>
</item>
<item id="domain_list" _delta="define">
<rank>6</rank>
</item>
<item id="server_list">
<rank>10</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="type" _delta="define">
<rank>11</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="status">
<rank>30</rank>
</item>
<item id="cname" _delta="define">
<rank>35</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="contacts_list">
<rank>140</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search>
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="type" _delta="define">
<rank>11</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="status">
<rank>30</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list>
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="type" _delta="define">
<rank>11</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="status">
<rank>30</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Middleware" _delta="define">
<parent>FunctionalCI</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>true</abstract>
<key_type>autoincrement</key_type>
<db_table>middleware</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field>finalclass</db_final_class_field>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/middleware.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="status" xsi:type="AttributeEnum">
<values>
<value id="production">production</value>
<value id="implementation">implementation</value>
<value id="stock">stock</value>
<value id="obsolete">obsolete</value>
</values>
<sql>status</sql>
<default_value>production</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="location" xsi:type="AttributeEnum">
<values>
<value id="china">China</value>
<value id="cibn">CIBN</value>
<value id="us">UnitedStates</value>
<value id="hk">HongKong</value>
<value id="ru">Russia</value>
<value id="in">India</value>
<value id="other">Other</value>
</values>
<sql>location</sql>
<default_value/>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="info" xsi:type="AttributeText" _delta="define">
<sql>info</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="server_list" xsi:type="AttributeLinkedSetIndirect" _delta="define">
<linked_class>lnkMiddlewareToServer</linked_class>
<ext_key_to_me>middleware_id</ext_key_to_me>
<count_min>0</count_min>
<count_max>0</count_max>
<ext_key_to_remote>server_id</ext_key_to_remote>
<duplicates/>
</field>
</fields>
<methods/>
<presentation>
<details _delta="define">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Database" _delta="define">
<parent>Middleware</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>true</abstract>
<key_type>autoincrement</key_type>
<db_table>database</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field>finalclass</db_final_class_field>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/database.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="RDS" _delta="define">
<parent>Database</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>rds</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/rds.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="MySQL" _delta="define">
<parent>Database</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>mysql</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/mysql.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="MongoDB" _delta="define">
<parent>Database</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>mongodb</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/mongodb.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Redis" _delta="define">
<parent>Database</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>redis</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/redis.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<field id="capacity" xsi:type="AttributeString" _delta="define">
<sql>capacity</sql>
<is_null_allowed>true</is_null_allowed>
<default_value>2G</default_value>
</field>
<field id="datatype" xsi:type="AttributeString" _delta="define">
<sql>datatype</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="language" xsi:type="AttributeString" _delta="define">
<sql>language</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="type" xsi:type="AttributeEnum" _delta="define">
<values>
<value id="sentinel">sentinel</value>
<value id="cluster">cluster</value>
</values>
<sql>type</sql>
<default_value>cluster</default_value>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="persistence" xsi:type="AttributeEnum" _delta="define">
<values>
<value id="yes">yes</value>
<value id="no">no</value>
</values>
<sql>persistence</sql>
<default_value>yes</default_value>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="business" xsi:type="AttributeEnum" _delta="define">
<values>
<value id="mobile">mobile</value>
<value id="tv">tv</value>
<value id="common">common</value>
</values>
<sql>business</sql>
<default_value>tv</default_value>
<is_null_allowed>false</is_null_allowed>
</field>
</fields>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>12</rank>
</item>
<item id="business">
<rank>13</rank>
</item>
<item id="capacity" _delta="define">
<rank>13</rank>
</item>
<item id="datatype" _delta="define">
<rank>14</rank>
</item>
<item id="language" _delta="define">
<rank>15</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="persistence" _delta="define">
<rank>17</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>12</rank>
</item>
<item id="business">
<rank>13</rank>
</item>
<item id="capacity" _delta="define">
<rank>13</rank>
</item>
<item id="datatype" _delta="define">
<rank>14</rank>
</item>
<item id="language" _delta="define">
<rank>15</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="persistence" _delta="define">
<rank>17</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>12</rank>
</item>
<item id="business">
<rank>13</rank>
</item>
<item id="capacity" _delta="define">
<rank>13</rank>
</item>
<item id="datatype" _delta="define">
<rank>14</rank>
</item>
<item id="language" _delta="define">
<rank>15</rank>
</item>
<item id="type" _delta="define">
<rank>16</rank>
</item>
<item id="persistence" _delta="define">
<rank>17</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="MessageQueue" _delta="define">
<parent>Middleware</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>true</abstract>
<key_type>autoincrement</key_type>
<db_table>messagequeue</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field>finalclass</db_final_class_field>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/messagequeue.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="SwiftMQ" _delta="define">
<parent>MessageQueue</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>swiftmq</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/swiftmq.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="ThirdSrv" _delta="define">
<parent>Middleware</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>true</abstract>
<key_type>autoincrement</key_type>
<db_table>thirdsrv</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field>finalclass</db_final_class_field>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/thirdsrv.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="server_list">
<rank>95</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="S3" _delta="define">
<parent>ThirdSrv</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>s3</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/s3.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Yunpan" _delta="define">
<parent>ThirdSrv</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>yunpan</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="location"/>
<attribute id="name"/>
</attributes>
</naming>
<display_template/>
<icon>images/yunpan.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="name"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields/>
<methods/>
<presentation>
<details _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="contacts_list">
<rank>95</rank>
</item>
<item id="applicationsolution_list">
<rank>90</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
<item id="description">
<rank>130</rank>
</item>
<item id="documents_list">
<rank>150</rank>
</item>
</items>
</details>
<search _delta="redefine">
<items>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="info">
<rank>18</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
<item id="move2production">
<rank>100</rank>
</item>
</items>
</search>
<list _delta="redefine">
<items>
<item id="ci_id">
<rank>100</rank>
</item>
<item id="name">
<rank>10</rank>
</item>
<item id="location">
<rank>11</rank>
</item>
<item id="status">
<rank>15</rank>
</item>
<item id="contacts">
<rank>19</rank>
</item>
<item id="org_id">
<rank>20</rank>
</item>
<item id="business_criticity">
<rank>40</rank>
</item>
</items>
</list>
</presentation>
</class>
<class id="Url" _delta="define">
<parent>FunctionalCI</parent>
<properties>
<category>bizmodel,searchable</category>
<abstract>false</abstract>
<key_type>autoincrement</key_type>
<db_table>url</db_table>
<db_key_field>id</db_key_field>
<db_final_class_field/>
<naming>
<attributes _delta="define">
<attribute id="monitor_node"/>
<attribute id="method"/>
<attribute id="applicationsolution_name"/>
<attribute id="url"/>
</attributes>
</naming>
<display_template/>
<icon>images/url.png</icon>
<reconciliation>
<attributes _delta="define">
<attribute id="url"/>
<attribute id="org_id"/>
<attribute id="organization_name"/>
</attributes>
</reconciliation>
</properties>
<fields>
<!--
由于参数拼接和curl命令会比较长,需要修改css/light-grey.css,添加如下代码
table.details>tbody>tr>td.label {
white-space:nowrap;
}
table.details>tbody>tr>td>div {
word-wrap: break-word;
word-break: break-all;
}
-->
<field id="url" xsi:type="AttributeString" _delta="define">
<sql>url</sql>
<is_null_allowed>false</is_null_allowed>
<validation_pattern>^(http|https)://[a-z0-9\-\.]+(:[0-9]+)?/((?!\?).)*$</validation_pattern>
</field>
<field id="applicationsolution_id" xsi:type="AttributeExternalKey">
<sql>applicationsolution_id</sql>
<target_class>ApplicationSolution</target_class>
<is_null_allowed>false</is_null_allowed>
<filter>SELECT ApplicationSolution AS app JOIN lnkContactToApplicationSolution AS l ON l.applicationsolution_id = app.id WHERE l.contact_id = :current_contact_id</filter>
<on_target_delete>DEL_AUTO</on_target_delete>
<allow_target_creation>false</allow_target_creation>
</field>
<field id="applicationsolution_name" xsi:type="AttributeExternalField">
<extkey_attcode>applicationsolution_id</extkey_attcode>
<target_attcode>name</target_attcode>
</field>
<field id="status" xsi:type="AttributeEnum">
<values>
<value id="production">production</value>
<value id="stock">stock</value>
</values>
<sql>status</sql>
<default_value>production</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="method" xsi:type="AttributeEnum">
<values>
<value id="get">GET</value>
<value id="post">POST</value>
<value id="put">PUT</value>
<value id="delete">DELETE</value>
<value id="head">HEAD</value>
<value id="propfind">PROPFIND</value>
<value id="report">REPORT</value>
</values>
<sql>method</sql>
<default_value>GET</default_value>
<is_null_allowed>false</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="monitor_node" xsi:type="AttributeEnum">
<values>
<value id="cn">China</value>
<value id="us">UnitedStates</value>
<value id="hk">HongKong</value>
</values>
<sql>monitor_node</sql>
<default_value>China</default_value>
<is_null_allowed>true</is_null_allowed>
<display_style>list</display_style>
</field>
<field id="headers" xsi:type="AttributeText" _delta="define">
<sql>headers</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="params" xsi:type="AttributeText" _delta="define">
<sql>params</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="body" xsi:type="AttributeText" _delta="define">
<sql>body</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="require_code" xsi:type="AttributeString" _delta="define">
<sql>require_code</sql>
<is_null_allowed>true</is_null_allowed>
<default_value>200</default_value>
</field>
<field id="require_str" xsi:type="AttributeString" _delta="define">
<sql>require_str</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
<field id="third_email" xsi:type="AttributeString">
<sql>third_email</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
<validation_pattern>^([a-z0-9\.\-_]+@[a-z0-9-]+\.[a-z]+,)*([a-z0-9\.\-_]+@[a-z0-9-]+\.[a-z]+)$</validation_pattern>
</field>
<field id="third_phone" xsi:type="AttributeString">
<sql>third_phone</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
<validation_pattern>^([0-9]{11},)*([0-9]{11})$</validation_pattern>
</field>
<field id="interval" xsi:type="AttributeString">
<sql>interval</sql>
<is_null_allowed>true</is_null_allowed>
<default_value>20</default_value>
<validation_pattern>^[1-9][0-9]$|^1[0-8][0-9]$</validation_pattern>
</field>
<field id="timeout" xsi:type="AttributeString">
<sql>timeout</sql>
<is_null_allowed>true</is_null_allowed>
<default_value>3</default_value>
<validation_pattern>^([0-9]|1[0-4])(\.[0-9]*)?$</validation_pattern>
</field>
<field id="failed_count" xsi:type="AttributeString">
<sql>failed_count</sql>
<is_null_allowed>true</is_null_allowed>
<default_value>3</default_value>
<validation_pattern>^[1-6]$</validation_pattern>
</field>
<field id="curl" xsi:type="AttributeText">
<sql>curl</sql>
<is_null_allowed>true</is_null_allowed>
<default_value/>
</field>
</fields>
<lifecycle>
<attribute>status</attribute>
<stimuli>
<stimulus id="ev_new" xsi:type="StimulusInternal"/>
<stimulus id="ev_online" xsi:type="StimulusUserAction"/>
<stimulus id="ev_offline" xsi:type="StimulusUserAction"/>
</stimuli>
<states>
<state id="production">
<flags>
<attribute id="org_id">
<read_only/>
</attribute>
<attribute id="business_criticity">
<read_only/>
</attribute>
<attribute id="curl">
<read_only/>
</attribute>
</flags>
<transitions>
<transition id="ev_offline">
<target>stock</target>
<actions/>
</transition>
</transitions>
</state>
<state id="stock">
<inherit_flags_from>production</inherit_flags_from>
<flags/>
<transitions>
<transition id="ev_online">
<target>production</target>
<actions/>
</