Go to main content
|
|
This appendix lists sample code snippets for extending the connector schema by adding a multivalued attribute (for example, __SECUTIRY_ATTRS__). All the code snippets listed in this appendix consider __SECURITY_ATTRS__ as the multivalued attribute being added to the connector schema.
The following is a sample code snippet for extending the connector schema to include the multivalued attribute that has been initialized by specifying the number of child attributes:
attr := attributelist(); attr.extend(5); attr (1) := attributeinfo('SECURITY_ATTR_NAME','varchar',1,1,1,1); attr (2) := attributeinfo('SECURITY_ATTR_VALUE','varchar',1,1,1,1); attr (3) := attributeinfo('SECURITY_ATTR_TYPE','varchar',1,1,1,1); attr (4) := attributeinfo('SECURITY_APP_ID','varchar',1,1,1,1); schemaout.extend; schemaout( 4 ) := schema_object('__SECURITY_ATTRS__',attr);
The following is a sample code snippet for extending the connector schema to include the multivalued attribute without initializing the child attributes in advance:
attr := attributelist(); attr.extend; attr (1) := attributeinfo('SECURITY_ATTR_NAME','varchar',1,1,1,1); attr.extend; attr (2) := attributeinfo('SECURITY_ATTR_VALUE','varchar',1,1,1,1); attr.extend; attr (3) := attributeinfo('SECURITY_ATTR_TYPE','varchar',1,1,1,1); attr.extend; attr (4) := attributeinfo('SECURITY_APP_ID','varchar',1,1,1,1); schemaout.extend; schemaout( 4 ) := schema_object('__SECURITY_ATTRS__',attr);
The following is a sample code snippet for extending the connector schema to include the multivalued attribute with mixed ways of initializing the child attributes:
attr := attributelist(); attr.extend(2); attr (1) := attributeinfo('SECURITY_ATTR_NAME','varchar',1,1,1,1); attr (2) := attributeinfo('SECURITY_ATTR_VALUE','varchar',1,1,1,1); attr.extend; attr (3) := attributeinfo('SECURITY_ATTR_TYPE','varchar',1,1,1,1); attr.extend; attr (4) := attributeinfo('SECURITY_APP_ID','varchar',1,1,1,1); schemaout.extend; schemaout( 4 ) := schema_object('__SECURITY_ATTRS__',attr);