Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

  1. Keine _ in keys.
  2. JSON Properties werden Camelcase geschrieben, also boMetaId statt bo_meta_id (sh.:http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml#Property_Name_Format)
  3. UIDs werden durch FQNs ersetzt:
    1. Statt der UID des BO-Meta wird der Package Name und der Name des BOs genutzt: de_test_Auftrag
    2. Attribute werden (wenn möglich) nicht voll-qualifiziert (Ausnahme: im den VLP, Layout ML-Regeln) - Siehe Diskussion
    3. Attribute werden klein am Anfang geschrieben: de_test_Auftrag_gesamtsumme
  4. Trennung von technischen und fachlichen Attributen: 
    1. Bei BOs wird der fachliche Inhalt unter dem Key "contentattributes" aufgelistet (früher "bo_values")
  5. Alle Links werden folgendermaßen gerendert:

    Codeblock
    languagejs
    "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"]
       }
    }
  6. URLs:
    1. FQN statt UID
  7. Dependencies:
    1. URL: FQNs statt UIDs, subforms
    2. 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"]
             	}
      	},
      }
      
      
  8. Umbenennungen
    1. cstr (in ContainerRVO.java) -> constraints

...

  1. Attribute sollten nicht voll-qualifiziert, weil:
    1. das mehr Traffic erzeugt
    2. das unübersichtlich aussieht
    3. Test-Fälle aufwendiger zu erstellen sind.
  2. Attribute müssen in Layout-ML + VLP Regeln auch zugreifbar sein, insbesondere wenn ein REST Service Client diese Attribute auswertet.
  3. HAL wird nicht verwendet, wegen der Vermischung von fachlichen und technischen Daten.
  4. Dependencies oder "subforms"?
    1. Was ist der key? Der Name des Attributes?
  5. Status Auflistung muss geändert werden:
    1. Beachten: Statuswechsel vs. Daten eingeben inkl. Statuswechsel
    2. URL zum Statuswechsel (ohne Datenänderung), Speichern inkl. Statuswechsel Attribut.
    3. Offen
  6. 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 

...