下面列出了怎么用org.hibernate.validator.constraints.NotEmpty的API类实例代码及写法,或者点击链接到github查看源代码。
@Editable(order=200, description="Specify value of the environment variable. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getValue() {
return value;
}
@Editable(order=100, name="LDAP URL", description=
"Specifies LDAP URL of the Active Directory server, for example: <i>ldap://ad-server</i>, or <i>ldaps://ad-server</i>")
@NotEmpty
@Override
public String getLdapUrl() {
return super.getLdapUrl();
}
@Editable(order=300, description=""
+ "To authenticate user against Active Directory and retrieve associated attributes and groups, OneDev "
+ "would have to first authenticate itself against the Active Directory server and OneDev does that by "
+ "sending 'manager' DN and password. The manager DN should be specified in form of "
+ "<i><account name>@<domain></i>, for instance: <i>[email protected]</i>")
@NotEmpty
@Override
public String getManagerDN() {
return super.getManagerDN();
}
@Editable(order=400, description="Specify command to check readiness of the service. This command will "
+ "be interpretated by cmd.exe on Windows images, and by shell on Linux images. It will be "
+ "executed repeatedly until a zero code is returned to indicate service ready. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getReadinessCheckCommand() {
return readinessCheckCommand;
}
@Editable(order=200, description=""
+ "In case user group relationship maintained at group side, this filter is used to determine belonging "
+ "groups of current user. For example: <i>(&(uniqueMember={0})(objectclass=groupOfUniqueNames))</i>. In "
+ "this example, <i>{0}</i> represents DN of current user")
@NotEmpty
public String getGroupSearchFilter() {
return groupSearchFilter;
}
@Editable(order=300, description=""
+ "To authenticate user against LDAP and retrieve associated attributes and groups, OneDev would have to "
+ "first authenticate itself against the LDAP server and OneDev does that by sending 'manager' DN and "
+ "password")
@NotEmpty
public String getManagerDN() {
return managerDN;
}
@Editable(order=800, description=""
+ "Specifies name of the attribute inside the user LDAP entry whose value will be taken as user "
+ "email. This field is normally set to <i>mail</i> according to RFC 2798")
@NotEmpty
public String getUserEmailAttribute() {
return userEmailAttribute;
}
@Editable(order=100, description="Name of the provider will serve two purpose: "
+ "<ul>"
+ "<li>Display on login button"
+ "<li>Form the authorization callback url which will be <i><server url>/" + SsoProcessPage.MOUNTED_PATH + "/" + SsoProcessPage.STAGE_CALLBACK + "/<name></i>"
+ "</ul>")
@UrlSegment // will be used as part of callback url
@NotEmpty
@Override
public String getName() {
return super.getName();
}
@Editable(order=100, description="Specify files relative to OneDev workspace. Use * or ? for pattern match. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@Patterns(interpolative = true, path=true)
@NotEmpty
public String getFilePatterns() {
return filePatterns;
}
@Editable(order=10)
@ParamName
@NotEmpty
@Override
public String getName() {
return super.getName();
}
@Editable(order=1100, description="Specify start page of the report relative to <a href='$docRoot/pages/concepts.md#job-workspace' target='_blank'>job workspace</a>, for instance: api/index.html. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getStartPage() {
return startPage;
}
@Editable(order=10000, name="Job Match Condition", description="Jobs applicable for this executor must match "
+ "condition specified here")
@JobMatch
@NotEmpty
public String getJobMatch() {
return jobMatch;
}
@Editable(order=200, description="Specify docker image of the service. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getImage() {
return image;
}
@Editable(order=200, description="Specify path to cache. Non-absolute path is considered to be relative to job workspace. "
+ "Specify \".\" (without quote) to cache workspace itself. "
+ "Note: Type @ to insert variable, use \\ to escape normal occurrences of @ or \\")
@Interpolative(variableSuggester="suggestVariables")
@Path
@NotEmpty
public String getPath() {
return path;
}
@Editable(order=100)
@ChoiceProvider("getValueChoices")
@ShowCondition("isNewValueVisible")
@OmitName
@NotEmpty
public String getNewValue() {
return newValue;
}
@Editable(order=100, name="new field")
@ChoiceProvider("getFieldChoices")
@ShowCondition("isNewFieldVisible")
@NotEmpty
@OmitName
public String getNewField() {
return newField;
}
@Editable(order=10)
@FieldName
@NotEmpty
@Override
public String getName() {
return super.getName();
}
@Editable(order=1000)
@RevisionPick
@NotEmpty(message="Please choose revision to create branch from")
@OmitName
public String getRevision() {
return revision;
}
@Editable(order=150, description="Specify the group to grant permissions for anonymous access")
@GroupChoice
@ShowCondition("isAnonymousGroupVisible")
@NotEmpty
public String getAnonymousGroup() {
return anonymousGroup;
}
@Editable(name="Specified default value")
@Password
@NotEmpty
@OmitName
public String getValue() {
return value;
}
@Editable(description="Groovy script to be evaluated. It should return a <i>String</i> value. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(order=1000, name="Title", group="Issue Detail", description="Specify title of the issue. "
+ "<b>Note:</b> Type <tt>@</tt> to <a href='$docRoot/pages/variable-substitution.md' target='_blank' tabindex='-1'>insert variable</a>, use <tt>\\</tt> to escape normal occurrences of <tt>@</tt> or <tt>\\</tt>")
@Interpolative(variableSuggester="suggestVariables")
@NotEmpty
public String getIssueTitle() {
return issueTitle;
}
@Editable(description="Groovy script to be evaluated. It should return login name of an user. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(description="Groovy script to be evaluated. The return value should be a list of user login names to "
+ "be used as choices. Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(description="Groovy script to be evaluated. It should return a <i>boolean</i> value. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(description="Groovy script to be evaluated. It should return a <i>Date</i> value. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(description="Groovy script to be evaluated. It should return list of string. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(order=100, description="Specify name of the role. <b class='red'>NOTE: </b> "
+ "Permission to view issues will be granted implicitly even if no other permissions "
+ "are specified here")
@NotEmpty
public String getName() {
return name;
}
@Editable(description="Groovy script to be evaluated. It should return a <i>string</i> value. "
+ "Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}
@Editable(description="Groovy script to be evaluated. The return value should be a value to color map, "
+ "for instance:<br>"
+ "<code>return [\"Successful\":\"#00ff00\", \"Failed\":\"#ff0000\"]</code>, "
+ "Use <tt>null</tt> if the value does not have a color. Check <a href='$docRoot/pages/scripting.md' target='_blank'>scripting help</a> for details")
@ScriptChoice
@OmitName
@NotEmpty
public String getScriptName() {
return scriptName;
}