mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Refactored XForms samples to provide one central location for all XForms tests and examples, continuous build also now builds a distribute archive of all the tests (except unit tests) and examples for use by QA, SEs and the installer
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13746 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<webscript>
|
||||
<shortname>Web Form Import Example</shortname>
|
||||
<description>Example for testing import of a Web Script from a Web Form</description>
|
||||
<url>/pmonks/webformimport?storeid={storeid}</url>
|
||||
<format default="xsd">any</format>
|
||||
<authentication>user</authentication> <!-- This should be "user", but currently web script imports don't pass through user credentials -->
|
||||
</webscript>
|
@@ -0,0 +1,14 @@
|
||||
// Parse arguments
|
||||
var storeid = args.storeid;
|
||||
|
||||
// Validate arguments
|
||||
if (storeid == undefined || storeid == "")
|
||||
{
|
||||
status.code = 400;
|
||||
status.message = "Mandatory query string parameter 'storeid' was not provided.";
|
||||
status.redirect = true;
|
||||
}
|
||||
|
||||
// Generate an id (in a truly terrible way, but it's just an example!)
|
||||
model.storeid = storeid;
|
||||
model.idValue = Math.floor(Math.random() * 1000);
|
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:alf="http://www.alfresco.org"
|
||||
xmlns:wsimp="http://www.alfresco.org/alfresco/webscriptimported"
|
||||
targetNamespace="http://www.alfresco.org/alfresco/webscriptimported"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xs:simpleType name="NonEmptyNormalizedStringType">
|
||||
<xs:restriction base="xs:normalizedString">
|
||||
<xs:minLength value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<xs:complexType name="WebScriptImportExampleType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Id" type="xs:nonNegativeInteger" nillable="false" minOccurs="1" maxOccurs="1" fixed="${idValue}" />
|
||||
<xs:element name="StoreId" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" fixed="${storeid}" />
|
||||
<xs:element name="Title" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="Summary" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="1" />
|
||||
<xs:element name="Keyword" type="wsimp:NonEmptyNormalizedStringType" nillable="false" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xs:element name="Body" type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
Reference in New Issue
Block a user