Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
452 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
src/test/resources/xml/SitesTest-testCreateSite03NameDuplicateFail.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<action xmlns="http://www.appng.org/schema/platform" id="create" eventId="siteEvent" async="false"> | ||
<config> | ||
<title id="site.create">Create site</title> | ||
<permissions> | ||
<permission ref="site.create" mode="set"></permission> | ||
</permissions> | ||
<params> | ||
<param name="form_action">create</param> | ||
</params> | ||
<meta-data binding="site" bindClass="org.appng.application.manager.form.SiteForm"> | ||
<field name="name" type="text" binding="site.name"> | ||
<label id="name">Name</label> | ||
<validation> | ||
<notNull> | ||
<message ref="site.name" class="ERROR" code="{validation.notNull}">Field must not be empty</message> | ||
</notNull> | ||
<size min="0" max="64"> | ||
<message ref="site.name" class="ERROR" code="{validation.string.max}">Enter at most 64 characters</message> | ||
</size> | ||
<pattern regexp="[a-zA-Z0-9\-]{3,}"> | ||
<message ref="site.name" class="ERROR" code="{validation.nameStrict}">Please enter a valid name, which may only consist of letters, numbers and hyphens</message> | ||
</pattern> | ||
</validation> | ||
<messages ref="name"> | ||
<message ref="name" class="ERROR">A different site with this name already exists!</message> | ||
</messages> | ||
</field> | ||
<field name="host" type="text" binding="site.host"> | ||
<label id="host">Hostname</label> | ||
<validation> | ||
<notNull> | ||
<message ref="site.host" class="ERROR" code="{validation.notNull}">Field must not be empty</message> | ||
</notNull> | ||
<pattern regexp="(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])"> | ||
<message ref="site.host" class="ERROR" code="{validation.host}">Please enter a valid host (examples: localhost example.com some.example.com)</message> | ||
</pattern> | ||
</validation> | ||
</field> | ||
<field name="hostAliases" type="longtext" binding="hostAliases"> | ||
<label id="hostAliases">Hostname aliases (one per line)</label> | ||
</field> | ||
<field name="domain" type="text" binding="site.domain"> | ||
<label id="domain">Domain</label> | ||
<validation> | ||
<notNull> | ||
<message ref="site.domain" class="ERROR" code="{validation.notNull}">Field must not be empty</message> | ||
</notNull> | ||
<pattern regexp="(http(s?)(\://))?((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))(\:[0-9]+)?"> | ||
<message ref="site.domain" class="ERROR" code="{validation.domain}">Please enter a valid domain (examples: http://www.example.com example.com localhost:8080)</message> | ||
</pattern> | ||
</validation> | ||
</field> | ||
<field name="description" type="longtext" binding="site.description"> | ||
<label id="description">Description</label> | ||
<validation> | ||
<size min="0" max="8192"> | ||
<message ref="site.description" class="ERROR" code="{validation.string.max}">Enter at most 8192 characters</message> | ||
</size> | ||
</validation> | ||
</field> | ||
<field name="active" type="checkbox" binding="site.active"> | ||
<label id="active">Active</label> | ||
</field> | ||
<field name="createRepository" type="checkbox" binding="site.createRepository"> | ||
<label id="site.createRepository">Create folder for JSP-contents</label> | ||
</field> | ||
<field name="template" type="list:radio" binding="template"> | ||
<label id="template">Template</label> | ||
</field> | ||
</meta-data> | ||
</config> | ||
<condition expression="${form_action eq 'create'}"/> | ||
<messages> | ||
<message ref="create" class="ERROR">Failed to create the site.</message> | ||
</messages> | ||
<datasource id="new-site"/> | ||
<userdata/> | ||
<data> | ||
<selection id="template"> | ||
<title id="template">Template</title> | ||
</selection> | ||
<result> | ||
<field name="name" type="text"> | ||
<value></value> | ||
</field> | ||
<field name="host" type="text"> | ||
<value></value> | ||
</field> | ||
<field name="hostAliases" type="longtext"> | ||
<value></value> | ||
</field> | ||
<field name="domain" type="text"> | ||
<value></value> | ||
</field> | ||
<field name="description" type="longtext"> | ||
<value></value> | ||
</field> | ||
<field name="active" type="checkbox"> | ||
<value>false</value> | ||
</field> | ||
<field name="createRepository" type="checkbox"> | ||
<value>false</value> | ||
</field> | ||
<field name="template" type="list:radio"> | ||
<value></value> | ||
</field> | ||
</result> | ||
</data> | ||
<bean id="sites"> | ||
<option name="action" id="create"/> | ||
</bean> | ||
</action> |
Oops, something went wrong.