Seitenhistorie
...
- Keine _ in keys.
- JSON Properties werden Camelcase geschrieben, also
boMetaId
stattbo_meta_id
(sh.:http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml#Property_Name_Format) - UIDs werden durch FQNs ersetzt:
- Statt der UID des BO-Meta wird der Package Name und der Name des BOs genutzt: de_test_Auftrag
- Attribute werden (wenn möglich) nicht voll-qualifiziert (Ausnahme: im den VLP, Layout ML-Regeln) - Siehe Diskussion
- Attribute werden klein am Anfang geschrieben:
de_test_Auftrag_gesamtsumme
- Trennung von technischen und fachlichen Attributen:
- Bei BOs wird der fachliche Inhalt unter dem Key "
content
attributes
" aufgelistet (früher "bo_values
")
- Bei BOs wird der fachliche Inhalt unter dem Key "
Alle Links werden folgendermaßen gerendert:
Codeblock language js "links": { "self": { // key ist das "rel" "href": "http://.../bo_metas/de_test_Auftrag/123", // FQN bei BO "methods": [ "GET", "POST"], // Array }, "bo_meta": { "href": "/bo_metas/de_test_Auftragsposition/", "methods": [ "GET"] } }
- URLs:
- FQN statt UID
- Dependencies:
- URL: FQNs statt UIDs, subforms
Inhalt:
Codeblock "subforms" : { "de_test_Auftragsposition_auftrag" : {" : { "links": { "self": { "href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Auftragsposition_auftrag/", "methods": [ "GET", "POST"] }, "bo_meta": { "href": "/bo_metas/de_test_Auftragsposition/", "methods": [ "GET"] } } }, "de_test_Reklamation_Folgeauftrag" : { "self": { "href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Reklamation_folgeauftrag/", "methods": [ "GET", "POST"] }, "bo_meta": { "href": "/bo_metas/de_test_Reklamation", "methods": [ "GET"] } }, "de_test_Reklamation_Auftrag" : { "self": { "href": "/bo_metas/de_test_Auftrag/123/subforms/de_test_Reklamation_auftrag/", "methods": [ "GET", "POST"] }, "bo_meta": { "href": "/bo_metas/de_test_Reklamation", "methods": [ "GET"] } }, }
- Umbenennungen
cstr
(in ContainerRVO.java) ->constraints
...
- Attribute sollten nicht voll-qualifiziert, weil:
- das mehr Traffic erzeugt
- das unübersichtlich aussieht
- Test-Fälle aufwendiger zu erstellen sind.
- Attribute müssen in Layout-ML + VLP Regeln auch zugreifbar sein, insbesondere wenn ein REST Service Client diese Attribute auswertet.
- HAL wird nicht verwendet, wegen der Vermischung von fachlichen und technischen Daten.
- Dependencies oder "subforms"?
- Was ist der key? Der Name des Attributes?
- Status Auflistung muss geändert werden:
- Beachten: Statuswechsel vs. Daten eingeben inkl. Statuswechsel
- URL zum Statuswechsel (ohne Datenänderung), Speichern inkl. Statuswechsel Attribut.
- Offen
- URLs + Inhalt
/
Codeblock |
---|
{
"session_id": "ckW5dWQzBxkIfiH2eaWb",
"username": "nuclos",
"locale": "de_DE",
"links": {
"list" : {"href": "http://localhost:8280/example/rest/bo_metas", "verb": "GET"},
"menu" : {"href": "http://localhost:8280/example/rest/bo?menu", "verb": "GET"}
}
} |
/bo_metas
Codeblock |
---|
{
"next_link": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302?start=50",
"list":[
{
"bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
"name": "Order",
"links":{
"self" : {"href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH", "verb": "GET"},
"list" : {"href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos", "verb": "GET, POST"}
}
},
{
"bo_meta_id": "sYFUgWuHvxtv8MDrpgV2",
"name": "Customer",
"links":{
"self" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2", "verb": "GET"},
"list" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2/bos", "verb": "GET, POST"}
}
},
{
"bo_meta_id": "jVRqzzCD7QdHpwzKvAqQ",
"name": "Article",
"links":{
"self" : {"href": "http://localhost:8280/example/rest/bo_metas/sYFUgWuHvxtv8MDrpgV2", "verb": "GET"},
"list" : {"href": "http://localhost:8280/example/rest/bo_metas/jVRqzzCD7QdHpwzKvAqQ/bos", "verb": "GET"}
}
}
]
} |
/bo_metas/A3wu3cgTYSt3iXx8mIeH
Codeblock |
---|
{
"bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
"name": "Order",
"links":[
{"rel": "bolist", "href": "http://localhost:8280/example/rest/bo_metas/A3wu3cgTYSt3iXx8mIeH", "verb": "GET, POST"},
{"rel": "detail_layout", "href": "http://localhost:8280/example/rest/bo/layout/detail/f0PLjlXHogX00oBANPrD", "verb": "GET"}
],
"attributes": {
"oGO8o3jU9P4EPvHqDwDc": {
"bo_attr_id": "oGO8o3jU9P4EPvHqDwDc",
"name": "name",
"type": "String",
"readonly": false,
"unique": true,
"nullable": false,
"reference": false,
"order": 1
},
"1XvTerXNGs4JYi2pLu5D1": {
"bo_attr_id": "1XvTerXNGs4JYi2pLu5D1",
"name": "Created at",
"type": "InternalTimestamp",
"readonly": false,
"unique": false,
"nullable": true,
"reference": false,
"order": 65510
}
} |
/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos
Codeblock |
---|
{
"links": {"next": {"href" : "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302?start=50", "verb": "GET"}},
"list": [
{
"bo_id": 40000302,
links:{
"self" : {"href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302", "verb": "GET"}
},
"title": "1011 Max Mustermann",
"info": "München, 800700, Teger.., 2014-06-26, 1.50"
},
{
"bo_id": 40000308,
"href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000308",
"title": "1010 Max Mustermann",
"info": "München, 800700, Teger.., 2014-06-05, 1.50"
},
{
"bo_id": 40000305,
"href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000305",
"title": "1012 Maria Mustermann",
"info": "Berlin, 100200, .., 2014-06-26, 2014-06-27"
}
]
} |
/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302
Codeblock |
---|
{
"bo_instance": {
"bo_id": 40000302,
"href": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302",
"bo_values": {
"DehvMLszOxRH2OHMcl5D": 1011,
"F8oMtVf266iYLHEF91LO": {id: 40000294, name:"Max Mustermann"},
"91cxckSRNQyaKskdj0Zl": {id: 40000295, name:"München, 800700, Tegernseeroberlandstr. 119"},
"sgVvrtGMgTS4B8l6MuOw": "2014-06-26",
"15f8oxrX6cSka7yq0jTS": "1.50",
"mkbW5XHJG69FyoxBA4uE": null,
"A3wu3cgTYSt3iXx8mIeH10": null
}
"bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
"readonly": false,
"layout": "http://localhost:8280/example/rest/meta/layout/-366277574",
"denpendencies": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302/dependence",
"title": "1011 Max Mustermann",
"info": "München, 800700, Teger.., 2014-06-26, 1.50",
"states": [
{
"state_id": "wJHQIygTfOGTRcbZNvd4",
"name": "Processing",
"numeral": 10,
"current": true
},
{
"state_id": "Ovf7rfxjXnUF19dDXHlj",
"name": "Finished",
"numeral": 80,
"current": false
},
{
"state_id": "hZm1rFHbbUvyEQDjELk6",
"name": "Canceled",
"numeral": 90,
"current": false
}
]
}
} |
/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302/dependencies
Codeblock |
---|
{
"6NnStbGHIp0xVoXK21KL": "http://localhost:8280/example/rest/data/A3wu3cgTYSt3iXx8mIeH/40000302/dependence/6NnStbGHIp0xVoXK21KL"
} |
/bo_metas/A3wu3cgTYSt3iXx8mIeH/bos/40000302/dependencies/6NnStbGHIp0xVoXK21KL
Codeblock |
---|
{
"all": true,
"total": 1,
"title": "Order position",
"bo_simple_list": [
{
"bo_instance_id": 40000303,
"href": "http://localhost:8280/example/rest/data/WPYYgEC0psVEY9d7C78Z/40000303",
"title": "2011 20 TB HDD",
"info": "99.00, 2.00"
}
]
} |
/bo?menu
Codeblock |
---|
[
{
"path": "Example",
"entries": [
{
"name": "Order",
"bo_meta_id": "A3wu3cgTYSt3iXx8mIeH",
"href": "http://localhost:8280/example/rest/meta/bometa/A3wu3cgTYSt3iXx8mIeH",
"icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.61-brightness.png"
},
{
"name": "Customer",
"bo_meta_id": "sYFUgWuHvxtv8MDrpgV2",
"href": "http://localhost:8280/example/rest/meta/bometa/sYFUgWuHvxtv8MDrpgV2",
"icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.119-piggy-bank.png"
},
{
"name": "Article",
"bo_meta_id": "jVRqzzCD7QdHpwzKvAqQ",
"href": "http://localhost:8280/example/rest/meta/bometa/jVRqzzCD7QdHpwzKvAqQ",
"icon_href": "http://localhost:8280/example/rest/meta/icon/org.nuclos.client.resource.icon.glyphish.195-barcode.png"
}
]
}
] |
/bo/layout/detail/f0PLjlXHogX00oBANPrD
...
Überblick
Inhalte