Class SY_SDataContract

This class handles the generation and validation of the SData native contract, an XSD file. I strongly recommend running the GenerateContract method any time the ProvideX dictionary changes, to keep the schema file up to date.

Properties

LOCAL boolTRUE  
LOCAL boolFALSE  
LOCAL cUseCOM  
PROPERTY PathToContract$  

Path and filename specifying the XSD file

PROPERTY TargetNamespace$  
The targetNamespace of the XSD
PROPERTY SelectionNamespaces$  
SelectionNamespaces used for XPath queries (implementation is unfinished)

Methods

FUNCTION GenerateContract()  
FUNCTION GenerateContract(silent)  

Generates the XSD contract file from analysis of the ProvideX dictionary.

ParameterDescription
silent{optional} [input, boolean] If True, don't display a progress bar. Default behavior is to display a progress bar if possible.
Returns [boolean] True if a contract could be generated. False otherwise.
FUNCTION ListBaseResources(outList$)  
FUNCTION ListBaseResources(outList$, silent)  

Lists the base resources (not the complex multi-tiered ones) which require security setups. Intended use is for publishing information to Role Maintenance, guaranteeing that the list of resources in Role Maintenance is determined using the same rules that the contract generator uses.

ParameterDescription
outList$ [output, string] If the method is successful, this is a SEP delimited list of resourceName, comma, and "0" or "1". Resources in this list are resources that require security setup. A "1" indicates that the resource has a business object and may support all CRUD operations. A "0" indicates that it doesn't.
silent{optional} [input, boolean] If True, don't display a progress bar. Default behavior is to display a progress bar if possible.
Returns [boolean] True if the list of resources could be built. False otherwise.
FUNCTION LoadContract()  

Loads the XSD contract file with MSXML DOM. Useful for spotting XML mistakes.

Returns [boolean] True if it loaded successfully. False otherwise and sets LastErrorMsg$ to the OS error, which should help diagnose the problem.
FUNCTION ValidateSchema()  

Loads the XSD contract file with MSXML SOM. Useful for spotting violations of XSD standards.

Returns [boolean] True if it loaded successfully. False otherwise and sets LastErrorMsg$ to the OS error, which should help diagnose the problem.

Properties inherited from: SY_SDataConstant

constSpecialResourceSuffix$, constSpecialResourceSuffix2$, constMaxFieldLength, constMaxTableNameLength, constResourceTypeLength, retHttpOK, retHttpCREATED, retHttpBADREQUEST, retHttpUNAUTHORIZED, retHttpFORBIDDEN, retHttpNOTFOUND, retHttpCONFLICT, retHttpGONE, retHttpPRECONDITIONFAILED, retHttpINTERNALSERVERERROR, retHttpSERVICEUNAVAILABLE, resourceTypeSIMPLE$, resourceTypeDETAIL$, resourceTypeDISTRIBUTION$, resourceTypeSY_SalesTaxSchedule$, resourceTypeSY_SalesTaxScheduleDetail$, resourceTypeAP_ManualCheckDetail$, resourceTypeAP_ManualCheckInvDetail$, resourceTypeSO_SalesOrderPayment$, resourceTypeSO_InvoicePayment$, resourceTypeIM_TransactionDetail$, resourceTypeIM_TransactionTierDist$