OneM2M_Templates.ttcn 115 KB
Newer Older
1 2 3 4 5 6 7 8
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     ETSI
9 10
 *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
 *              $Id: OneM2M_Templates.ttcn 347 2017-08-11 08:48:20Z reinaortega $
11 12 13 14 15 16 17 18 19 20
 *  @desc       Module containing templates for oneM2M
 *
 */
module OneM2M_Templates {

	import from XSD all;
	import from OneM2M_Types all;
	import from OneM2M_TypesAndValues all;
	//import from OneM2M_AdditionalTypes all;
	import from OneM2M_Pixits all;
21
	//import from OneM2M_Functions all;
22

23
		
24 25 26 27 28 29
	/**
	 * @desc Get a converted to string random number 
	 * @param p_lower Lower limit 
	 * @param p_upper Upper limit
	 * @return Random number converted to string
	 * @verdict 
30
	 */
31 32 33 34 35
	function f_rnd(in integer p_lower, in integer p_upper) return charstring {
		
		return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);	
	}

36 37

	/* Templates */
38
	
39
	group Primitives {
40 41 42 43
		/** 
		 * @desc Base template for request sending operations
		 * @param p_requestPrimitive
		 */
44
		template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
45 46 47 48 49
			primitive := { requestPrimitive := p_requestPrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := PX_PROTOCOL_BINDING,
			serialization := PX_SERIALIZATION, 
50
			forcedFields := p_forcedFields
51 52 53 54 55 56
		};
    	
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
57
		template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
58 59 60 61 62
			primitive := { responsePrimitive := p_responsePrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := PX_PROTOCOL_BINDING,
			serialization := PX_SERIALIZATION, 
63
			forcedFields := p_forcedFields
64
		};
65 66 67 68 69 70 71 72 73 74 75 76 77 78
		
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
		template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
			primitive := { responsePrimitive := p_responsePrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := "HTTP",
			serialization := PX_SERIALIZATION, 
			forcedFields := p_forcedFields
		};
		
79 80 81
		template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
			primitive := { requestPrimitive := p_requestPrimitive}
		};
82 83 84 85 86 87 88 89 90
    	
		/** 
		 * @desc Base template for response receiving operations
		 * @param p_responsePrimitive
		 */
		template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive) := {
			primitive := { responsePrimitive := p_responsePrimitive}
		};
    	
91
	}//end of group primitives
92 93 94 95
	
	group RequestPrimitives { 
		
		group Retrieve {
96

97 98 99 100
			/**
			 * @desc Base RETRIEVE request primitive
			 * @param p_targetResourceAddress Target resource address
			 * @param p_originator Originator (from)
101
			 */
102
			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
103
				operation := int2,
104
				to_ := p_targetResourceAddress,
105
				from_ := p_originator,
106 107
				requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
				resourceType := omit,
108
				primitiveContent := omit,
109
				role := omit, 
110 111 112 113 114 115 116 117 118 119 120
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
121
				discoveryResultType := omit
122 123
			};
        	
124 125 126 127 128
			/**
			 * @desc RETRIEVE request primitive for a single attribute in To field ("targetResourceAddress#AttributeName")
			 * @param p_targetResourceAddress Target resource address (including "#AttributeName")
			 * @param p_originator Originator (from)
			 */
129 130 131 132 133 134
			template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
				operation := int2,
				to_ := p_targetResourceAddress,
				from_ := p_originator,
				requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
				resourceType := omit,
135
				primitiveContent := omit, 
136
				role := omit,
137 138 139 140 141 142 143 144 145 146 147
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
148 149
				discoveryResultType := omit
			};
150
        	
151 152 153 154 155
			/**
			 * @desc RETRIEVE request primtive containing the target attributes in the primitiveContent field
			 * @param p_targetResourceAddress Target resource address 
			 * @param p_attributeList Target attribute list
			 * @param p_originator Originator (from)
156
			 */
157
			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator) := {
158
				operation := int2,
159
				to_ := p_targetResourceAddress,
160
				from_ := p_originator,
161 162
				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
				resourceType := omit,
163
				primitiveContent := {attributeList := p_attributeList},
164
				role := omit,
165 166 167 168 169 170 171 172 173 174 175
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
176
				discoveryResultType := omit
177
			};
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
			
			/**
			  * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveResourceFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage) modifies m_retrieveResource := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := p_filterUsage, 
					limit := omit
				}
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveResourceDiscResTypeFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) DiscResType p_discResType, in template (value) FilterUsage p_filterUsage) modifies m_retrieveResource := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := p_filterUsage,
					limit := omit
				},
				discoveryResultType := p_discResType
			};
			
			/**
				  * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
				  * @param p_targetResourceAddress Target resource address 
				  * @param p_filterCriteria FilterCriteria
				  * @param p_originator Originator (from)
				 */
				template (value) RequestPrimitive m_retrieveResourceInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieveResource := {
					requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
					filterCriteria := {
						createdBefore := omit,
						createdAfter := omit,
						modifiedSince := omit,
						unmodifiedSince := omit,
						stateTagSmaller := omit,
						stateTagBigger := omit,
						expireBefore := omit,
						expireAfter := omit,
						labels := omit,
						resourceType := omit,
						sizeAbove := omit,
						sizeBelow := omit,
						contentType_list := {},
						attribute_list := {},
						filterUsage := omit,
						limit := omit
					}
				};
			
264
		}//end group Retrieve
265

266 267 268
		group Update {
    		
			template (value) RequestPrimitive m_update := {
269 270
				operation := int3,
				to_ := "NotInitialized",
271 272
				from_ := "NotInitialized",
				requestIdentifier := "m_update" & f_rnd(1, 1000000),
273
				resourceType := omit,
274
				primitiveContent:= omit,
275
				role := omit, 
276 277 278 279 280 281 282 283 284 285 286
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
287 288 289 290 291 292 293 294
				discoveryResultType := omit
			};
        	
			/**
			 * @desc Base UPDATE request primitive for Ae resource
			 */
			template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
				requestIdentifier := "m_updateAe" & f_rnd(1, 1000000),
295
				primitiveContent:= {aE := m_contentUpdateAe}
296 297 298 299 300 301 302
			};
        	
			/**
			 * @desc Base UPDATE request primitive for Container resource
			 */
			template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
303 304 305 306 307 308 309 310 311
				primitiveContent:= {container := m_contentUpdateContainer}
			};
			
			/**
			 * @desc Base UPDATE request primitive for ContentInstance resource
			 */
			template (value) RequestPrimitive m_updateContentInstanceBase modifies m_update:= {
				requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000),
				primitiveContent:= {contentInstance := m_contentUpdateContentInstance}
312 313
			};
			
314 315 316
			/**
			 * @desc Base UPDATE request primitive for AccessControlPolicy resource
			 */        				
317
			template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
318
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
319
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcp}
320 321 322 323
			};
			
			template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
324
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}
325 326
			};
			
327 328 329
			/**
			 * @desc Base UPDATE request primitive for Group resource
			 */
330
			template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
331
				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
332 333 334 335 336 337 338 339 340
				primitiveContent:= {group_ := m_contentUpdateGroup}
			};
			
			/**
			 * @desc Base UPDATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_updateCSEBaseBase modifies m_update := {
				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
				primitiveContent:= {cSEBase := m_contentUpdateCSEBase}
341 342
			};
			
343 344 345
			/**
			 * @desc Base UPDATE request primitive for Schedule resource
			 */
346
			template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
347
				requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
348
				primitiveContent:= {schedule := m_contentUpdateSchedule}
349 350
			};
			
351 352 353
			/**
			 * @desc Base UPDATE request primitive for PollingChannel resource
			 */
354
			template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
355
				requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
356
				primitiveContent:= {pollingChannel := m_contentUpdatePollingChannel}
357 358
			};
			
359 360 361
			/**
			 * @desc Base UPDATE request primitive for Subscription resource
			 */
362
			template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
363
				requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
364
				primitiveContent:= {subscription := m_contentUpdateSubscription}
365 366
			};
			
367
			template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
368 369
				to_ 				:= p_locResourceAddress,
				requestIdentifier	:= "m_updateLocationPolicy",
370
				primitiveContent	:= {locationPolicy := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod)}
371 372
			  };
        	
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
			template (value) RequestPrimitive m_updateNodeBase modifies m_update := {
				requestIdentifier := "m_updateNode" & f_rnd(1, 1000000),
				primitiveContent:= {node := m_contentUpdateNode}
			}
        	
			template (value) RequestPrimitive m_updateRemoteCSEBase modifies m_update := {
			   requestIdentifier := "m_updateRemoteCSEBase" & f_rnd(1, 1000000),
			   primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE}
			}
        	
			template (value) RequestPrimitive m_updateAE modifies m_update := {
				requestIdentifier := "m_updateAE" & f_rnd(1, 1000000),
				primitiveContent := {aE := m_contentUpdateAe}
			}
        	
			template (value) RequestPrimitive m_updateAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_update:= {
				requestIdentifier := testcasename() & "-m_updateAEAnnc" & f_rnd(1, 1000000),
				resourceType := int10002,
				primitiveContent := {aEAnnc := m_contentUpdateAEAnnc}
			};
393 394 395 396 397 398 399 400
		}//end group Update
    	
		group Create {

			template (value) RequestPrimitive m_create := {
				operation := int1,
				to_ := "NotInitialized",
				from_ := "NotInitialized",
401
				requestIdentifier := testcasename() & "-m_create" & f_rnd(1, 1000000),
402 403
				resourceType := omit,
				primitiveContent := omit,
404
				role := omit,
405 406 407 408 409 410 411 412 413 414 415
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
416
				discoveryResultType := omit
417 418
			};
        	
419
			/**
420
			 * @desc Base Reception template for create operation
421
			 */
422
			template RequestPrimitive mw_create(template XSD.ID p_from := *, template XSD.ID p_to := ?) := {
423
				operation := int1,
424 425
				to_ := p_to,
				from_ := p_from,
426
				requestIdentifier := ?,
427 428
				resourceType := ?,
				primitiveContent := ?,
429 430 431 432 433 434 435 436 437 438 439 440 441
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
			}
			
			
			/**
			 * @desc Base CREATE request primitive for AEAnnc resource
			 * @param p_accessControlPolicyIds
			 * @param p_to
			 * @param p_from
			 * @param p_appId
			 * @param p_stemId
			 */
			template (value) RequestPrimitive m_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_create:= {
				to_ := p_to,
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := testcasename() & "-m_createAEAnnc" & f_rnd(1, 1000000),
				resourceType := int10002,
				primitiveContent := {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, valueof(p_to) & "/" & p_stemId)}
			};
			
			/**
			 * @desc Reception template for CREATE AEAnnc
			 */
			template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit) modifies mw_create := {
				resourceType := int10002,
				primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
467
			};
468

469
			template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIds := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName :=  c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
470
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
471
				requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
472
				resourceType := int2,
473
				primitiveContent := {aE := m_contentCreateAe(p_accessControlPolicyIds,p_resourceName, p_appId, p_poaList)}
474
			};
475
        	
476 477 478 479
			/**
			 * @desc Reception template for AE registration
			 */
			template RequestPrimitive mw_createAe(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
480
				resourceType := int2,
481 482 483 484 485 486 487 488
				primitiveContent := {aE := ?}
			};  
			        	
			template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) PoaList p_poaList) modifies m_create := {
				from_ := PX_AE1_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
				resourceType := int2,
				primitiveContent := {aE := m_contentCreateAe(p_accessControlPolicyIds, c_aeAuxName, -, p_poaList)}
489
			};
490
        	
491 492 493
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource
			 */
494
			template (value) RequestPrimitive m_createAcpBase modifies m_create := {
495
				requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
496
				resourceType := int1,
497
				primitiveContent := {accessControlPolicy := m_contentCreateAcp ()}
498 499
			};
				
500
			template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
501
				to_ := p_parentResourceAddress,
502
				requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
503
				resourceType := int1,
504 505 506 507 508 509 510 511 512 513 514
				primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}
			};
        	
			/**
			 * @desc Reception template for CREATE AcpAnnc
			 */
			template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				to_ := p_to,
				from_ := p_from,
				resourceType := int10002,
				primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnnc(-)}
515
			};
516
        	
517 518 519 520
       	
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource (AUX)
			 */
521
			template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) modifies m_create := {
522
				requestIdentifier := testcasename() & "-m_createAcpAux" & f_rnd(1, 1000000),
523
				resourceType := int1,
524
				primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}
525
			};
526
        	
527 528 529
			/*template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
				from_ := PX_SUPER_USER,
				requestIdentifier := testcasename() & "-m_createCSE" & f_rnd(1, 1000000),
530
				resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
531 532 533 534 535 536 537 538 539 540
				primitiveContent := {cSEBase := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}
			};*/
			
			/**
			 * @desc Base CREATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_createCSEBaseBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
				resourceType := int5,
				primitiveContent := {cSEBase := m_contentCreateCSEBase}
541 542
			};
        	
543 544 545 546
       	
			/**
			 * @desc Base CREATE request primitive for Container resource
			 */
547
			template (value) RequestPrimitive m_createContainerBase modifies m_create := {
548
				requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
549
				resourceType := int3,
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
				primitiveContent := {container := m_contentCreateContainer}
			};
			
			/**
			 * @desc Base CREATE request primitive for remoteCSE resource
			 */
			template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := {
				requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000),
				resourceType := int16,
				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
			};
			
			/**
			 * @desc CREATE request primitive for Container resource wiht no resourceName provided
			 */
			template (value) RequestPrimitive m_createContainer_noResourceName modifies m_createContainerBase := {
				primitiveContent := {container := m_contentCreateContainer(omit)}
567 568
			};
	
569
			template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultContainerResourceName) modifies m_create := {
570
				to_ := p_parentResourceAddress,
571
				requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
572
				resourceType := int3,
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589
				primitiveContent := {container := m_contentCreateContainer(p_resourceName)}
			};
        	
			/**
			 * @desc Reception template for CREATE Container
			 */
			template RequestPrimitive mw_createContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int3,
				primitiveContent := {container := ?}
			};  
			
			/**
			 * @desc Base Reception template for CREATE ContainerAnnc
			 */
			template RequestPrimitive mw_createContainerAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10003,
				primitiveContent := {containerAnnc := mw_contentCreateContainerAnncBase}
590
			};
591
        	
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607
			/**
			 * @desc Base CREATE request primitive for Content Instance resource
			 */
			template (value) RequestPrimitive m_createContentInstanceBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000),
				resourceType := int4,
				primitiveContent := {contentInstance := m_contentCreateContentInstance}
			};
				
			/**
			 * @desc CREATE request primitive for Content Instance resource with no resourceName provided
			 */
			template (value) RequestPrimitive m_createContentInstance_noResourceName modifies m_createContentInstanceBase := {
				primitiveContent := {contentInstance := m_contentCreateContentInstance(omit)}
			};
    		
608 609 610
			template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := "admin:admin",
611
				requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000),
612
				resourceType := int4,
613
				primitiveContent := {contentInstance := m_contentCreateContentInstance(-, p_primitiveContent)}
614
			};
615
    		
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640
			/**
			 * @desc Reception template for CREATE ContentInstanceAnnc
			 */
			template RequestPrimitive mw_createContentInstanceAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
				primitiveContent := {contentInstanceAnnc := ?}
			};  
			
			/**
			 * @desc Base Reception template for CREATE ContentInstanceAnnc
			 */
			template RequestPrimitive mw_createContentInstanceAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
				primitiveContent := {contentInstanceAnnc := mw_contentCreateContentInstanceAnncBase}
			};  
			
			/**
			 * @desc Base CREATE request primitive for Delivery resource
			 */
			/*template (value) RequestPrimitive m_createDeliveryBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createDelivery" & f_rnd(1, 1000000),
				resourceType := int6,
				primitiveContent := {delivery := m_contentCreateDelivery()}
			};*/
        	    		
641 642 643 644
       	
			/**
			 * @desc Base CREATE request primitive for Group resource
			 */
645
			template (value) RequestPrimitive m_createGroupBase modifies m_create := {
646
				requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
647
				resourceType := int9,
648
				primitiveContent := {group_ := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)}	//TODO: p_resourceId
649
			};
650
        	
651
			template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738
															in template (value) ListOfURIs p_memberIds := {"NotInitialized"},
															in template (omit) AcpType p_accessControlPolicyIds,
															in template (omit) MemberType p_memberType := omit,
															in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
															in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
															in template (omit) XSD.String p_name := "MyGroup") modifies m_create := {
				requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
				resourceType := int9,
				primitiveContent := {group_ := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}	//TODO: p_resourceId
			};
        	
			/**
			 * @desc Reception template for CREATE GroupAnnc
			 */
			template RequestPrimitive mw_createGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10009,
				primitiveContent := {groupAnnc := ?}
			};  
			
			/**
			 * @desc Base Reception template for CREATE GroupAnnc
			 */
			template RequestPrimitive mw_createGroupAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10009,
				primitiveContent := {groupAnnc := mw_contentCreateGroupAnncBase}
			};
        	
			/**
			 * @desc Base CREATE request primitive for MgmtCmd resource
			 */
			template (value) RequestPrimitive m_createMgmtCmdBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtCmd" & f_rnd(1, 1000000),
				resourceType := int12,
				primitiveContent := {mgmtResource := m_contentCreateMgmtCmd (-,-)}
			};
			
			/**
			 * @desc Base CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObjBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000),
				resourceType := int13,
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-,-)}
			};
        	
			/**
			 * @desc CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObj modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000),
				resourceType := int13,
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-, -)}
			};
        	
			/**
			 * @desc Reception template for CREATE MgmtObjAnnc
			 */
			template RequestPrimitive mw_createMgmtObjAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10013,
				primitiveContent := {announcedMgmtResource := ?}
			};  
			
			/**
			 * @desc Base Reception template for CREATE MgmtObjAnnc
			 */
			template RequestPrimitive mw_createMgmtObjAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10013,
				primitiveContent := {announcedMgmtResource := mw_contentCreateMgmtObjAnncBase}
			};  
			
			/**
			 * @desc Base CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNodeBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000),
				resourceType := int14,
				primitiveContent := {node := m_contentCreateNode(-, -, -) }
			};
        	
			/**
			 * @desc CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNode modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000),
				resourceType := int14,
				primitiveContent := {node := m_contentCreateNode(-,-,-) }
			};
739
        	
740 741 742 743 744 745 746
			/**
			 * @desc Reception template for CREATE NodeAnnc
			 */
			template RequestPrimitive mw_createNodeAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
				primitiveContent := {nodeAnnc := ?}
			};  
747 748 749 750
       	
			/**
			 * @desc Base CREATE request primitive for PollingChannel resource
			 */
751
			template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
752
				requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
753
				resourceType := int15,
754
				primitiveContent := {pollingChannel := m_contentCreatePollingChannel (-)}
755
			};
756
        	
757
			template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId) modifies m_create := {
758 759
				to_ := p_parentResourceAddress,
				from_ := p_originatorId,
760
				requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
761
				resourceType := int15,
762
				primitiveContent := {pollingChannel := m_contentCreatePollingChannel ()}
763
			};
764
        	
765 766 767
			/**
			 * @desc Base CREATE request primitive for Schedule resource
			 */
768
			template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
769
				requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
770
				resourceType := int18,
771
				primitiveContent := {schedule := m_contentCreateSchedule ({{"0 0 0,1,2 1 1 * *"}})}
772
			};
773
        	
774 775
			template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
				to_ := p_parentResourceAddress,
776
				requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
777
				resourceType := int18,
778
				primitiveContent := {schedule := m_contentCreateSchedule (p_scheduleElement, p_name)}
779
			};
780
        	
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798
			/**
			 * @desc Reception template for CREATE ScheduleAnnc
			 */
			template RequestPrimitive mw_createScheduleAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10018,
				primitiveContent := {scheduleAnnc := ?}
			};  
			
			/**
			 * @desc Base Reception template for CREATE ScheduleAnnc
			 */
			template RequestPrimitive mw_createScheduleAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10018,
				primitiveContent := {scheduleAnnc := mw_contentCreateScheduleAnncBase}
			};  
        	
			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
799
				resourceType := int19,//FIXME Is this the correct value?
800
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedAppIDs, p_allowedAEs)}
801
			};
802
        	
803 804 805 806 807 808 809 810
			/**
			 * @desc Base CREATE request primitive for ServiceSubscribedAppRule Resource
			 */
			template (value) RequestPrimitive m_createServiceSubscribedAppRuleBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRuleBase" & f_rnd(1, 1000000),
				resourceType := int19,
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRuleBase}
			};
811 812 813 814
       	
			/**
			 * @desc Base CREATE request primitive for Subscription resource
			 */
815
			template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
816
				requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
817
				resourceType := int23,
818
				primitiveContent := {subscription := m_contentCreateSubscription ({"NotInitialized"})}
819 820
			};
        	
821 822
			template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
				to_ := p_parentResourceAddress,
823
				requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
824
				resourceType := int23,
825
				primitiveContent := {subscription := m_contentCreateSubscription (p_notificationURI, p_name)}
826 827 828 829 830 831 832 833 834 835 836
			};
        	
			template (value) RequestPrimitive m_createSubscriptionAdvanced(	XSD.ID p_parentResourceAddress, 
																		   in template (omit)  XSD.String p_name := omit,
																		   in template (value) ListOfURIs p_notificationURI,
																		   in template (omit) EventNotificationCriteria p_eventNotificationCriteria := omit,
																		   in template (omit) XSD.PositiveInteger p_expirationCounter := omit,
																		   in template (omit) BatchNotify p_batchNotify := omit,
																		   in template (omit) XSD.Boolean p_latestNotify := omit,
																		   in template (omit) XSD.AnyURI p_subscriberURI := omit,
																		   in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := {
837 838 839 840 841 842 843 844 845 846
				primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}
			};
        	
			/**
			 * @desc Base CREATE request primitive for Location Policy resource
			 */
			template (value) RequestPrimitive m_createLocationPolicyBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000),
				resourceType := int10,
				primitiveContent := {locationPolicy := m_contentCreateLocationPolicyBase}
847 848
			};
        	
849 850 851
			template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := {
        		
				requestIdentifier	:= testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001"  by prepending the AE-ID-Stem and slash(‘/’) in front of it
852
				resourceType		:= int10,
853
				primitiveContent	:= {locationPolicy := m_contentCreateLocationPolicy(p_locationSource, p_accessControlPolicyIds, p_locationUpdatePeriod, p_locationTargetID, p_locationServerAddress) },
854 855
				resultContent := int1//default
			};
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875
        	
			/**
			 * @desc Reception template for CREATE LocationPolicyAnnc
			 */
			template RequestPrimitive mw_createLocationPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10010,
				primitiveContent := {locationPolicyAnnc := ?}
			}; 
			
			/**
			 * @desc Base Reception template for CREATE LocationPolicyAnnc
			 */
			template RequestPrimitive mw_createLocationPolicyAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10010,
				primitiveContent := {locationPolicyAnnc := mw_contentCreateLocationPolicyAnncBase}
			}; 
			
			template (value) RequestPrimitive m_createNotification(in template (value) Representation p_resourcePresentation, in template (omit)NotificationEventType p_notifEventType, in template (omit) XSD.AnyURI p_subscriptionReference, in template (omit) XSD.AnyURI p_notifForwardingURI) modifies m_create := {
			  requestIdentifier	:= testcasename() & "-m_createNotification" & f_rnd(1, 1000000),
			  primitiveContent	:= {notification := m_contentCreateNotification(p_resourcePresentation, p_notifEventType, p_subscriptionReference, p_notifForwardingURI)},
876 877 878
			  resultContent		:= int1 //default
        	  
			};
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906
			
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsConfigBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsConfig" & f_rnd(1, 1000000),
				resourceType := int22,
				primitiveContent := {statsConfig := m_contentCreateStatsConfigBase}
			};
			
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsCollectBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsCollect" & f_rnd(1, 1000000),
				resourceType := int21,
				primitiveContent := {statsCollect := m_contentCreateStatCollectBase}
			};
			
			/**
			 * @desc Base CREATE request primitive for M2mServiceSubscriptionProfile resource
			 */
			template (value) RequestPrimitive m_createM2mServiceSubscriptionProfileBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createM2mServiceSubscriptionProfile" & f_rnd(1, 1000000),
				resourceType := int11,
				primitiveContent := {m2mServiceSubscriptionProfile := m_contentCreatem2mServiceSubscriptionProfileBase}
			};
			
907
		}//end group Create
908
    	
909
		group Delete {
910
    	
911
			template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress, in XSD.ID p_originator := PX_SUPER_AE_ID) := {
912 913
				operation := int4,
				to_ := p_resourceAddress,
914 915
				from_ := p_originator,
				requestIdentifier := testcasename() & "-m_deleteResource" & f_rnd(1, 1000000),
916 917
				resourceType := omit,
				primitiveContent := omit, 
918
				role := omit, 
919 920 921 922 923 924 925 926 927 928 929
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
930
				discoveryResultType := omit
931 932
			};
        	
933 934 935 936 937 938 939 940 941 942 943 944 945
		}//end group Delete
    	
		group Notify {
    		
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_notifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
946
				primitiveContent := {notification := mw_contentNotificationBase},
947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_aggregatedNotifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
971
				primitiveContent := { aggregatedNotification := ?},
972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			
991 992
			template RequestPrimitive mw_notify(in template (present) Notification p_notification) modifies mw_notifyBase := {
				primitiveContent := {notification := p_notification}
993 994 995 996 997 998
			};
			

			
    		
		}//end of group Notify
999 1000 1001
	}//end group RequestPrimitives
	
	group ContentCreate {
1002 1003 1004 1005 1006 1007 1008 1009 1010
		/**
		 * @desc Base primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
		template AEAnnc_optional m_contentCreateAEAnnc (in template (omit)  Labels p_labels, in template (omit) AcpType p_accessControlPolicyIds, XSD.ID p_appId := PX_APP_ID, in template (omit) XSD.AnyURI p_nodeLink := omit) := {
			resourceName := omit,//O TODO 
1011 1012 1013 1014 1015
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
1016 1017
			labels := p_labels,//O
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
1018
			expirationTime := omit,//O
1019
			link := omit,//M TODO Put the right value
1020 1021 1022 1023 1024
			appName := omit,//O
			app_ID := p_appId,//M
			aE_ID := omit,//NP
			pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//O
1025
			nodeLink := p_nodeLink,//NP
1026 1027 1028 1029
			requestReachability := true,//M
			contentSerialization := omit,//O
			choice := omit//NP
		};	
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058

		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
		template AEAnnc_optional mw_contentCreateAEAnnc (in template  Labels p_labels := ?, in template AcpType p_accessControlPolicyIds := ?) := {
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := p_labels,//MA
			accessControlPolicyIDs := p_accessControlPolicyIds,//MA
			expirationTime := ?,//MA M
			link := ?,//M
			appName := omit,//OA
			app_ID := omit,//OA
			aE_ID := omit,//OA
			pointOfAccess := omit, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//OA
			nodeLink := omit,//OA
			requestReachability := omit,//OA
			contentSerialization := omit,//OA
			choice := omit//NA
		};	
1059
		
1060 1061 1062
		/**
		 * @desc Base primitiveContent for CREATE operation for AE resource
		 * @param p_name Resource name
1063
		 * @param p_accessControlPolicyIds ACP IDs for the AE
1064
		 */
1065
		template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit)  XSD.String p_name := c_defaultAeResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
1066

1067 1068 1069 1070 1071 1072 1073
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
1074
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
1075
			expirationTime := omit,//O
1076 1077 1078
			announceTo := omit,//O
			announcedAttribute := omit,//O
			appName := omit,//O
1079
			app_ID := p_appId,//M
1080 1081 1082 1083 1084 1085 1086 1087
			aE_ID := omit,//NP
			pointOfAccess := p_poaList, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//O
			nodeLink := omit,//NP
			requestReachability := true,//M
			contentSerialization := omit,//O
			choice := omit//NP
		};	
1088
    	
1089 1090 1091 1092 1093 1094
		/**
		 * @desc Base primitiveContent for CREATE operation for AccessControlPolicy resource
		 * @param p_name Resource name
		 * @param p_acor Allowed originators
		 * @param p_allowedOperations Allowed operations
		 */
1095
		template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
1096 1097 1098 1099 1100 1101 1102 1103 1104 1105
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
1106
			privileges := {
1107
				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
1108
			},//M
1109
			selfPrivileges := {
1110
				accessControlRule_list<