public boolean isValid(final String fullyQualifiedClassName, final ConstraintValidatorContext constraintValidatorContext) { try { return isValidPackageName(fullyQualifiedClassName); } catch (Exception e) { return false; } }
public void initialize(final ConnectionPoolConstraint constraint) { this.poolFaults = constraint.value(); }
@ResourceNameConstraint(message="{resourcename.invalid.character}", payload=ResourcePool.class) public interface ResourcePool extends Resource, Payload { /** * Gets the value of the name property. * * @return possible object is * {@link String } */ @Attribute(key=true) @NotNull @Pattern(regexp=NAME_APP_REGEX, message="{resourcepool.invalid.name.key}", payload=ResourcePool.class) public String getName(); /** * Sets the value of the name property. * * @param value allowed object is * {@link String } */ public void setName(String value) throws PropertyVetoException; }
/** * Gets the value of the transportProtocolClass property. * * @return possible object is * {@link String } */ @Attribute (defaultValue="com.sun.mail.smtp.SMTPTransport") @JavaClassName public String getTransportProtocolClass();
@NotTargetKeyword(message="{cluster.reserved.name}", payload=Cluster.class) @Pattern(regexp=NAME_SERVER_REGEX, message="{cluster.invalid.name}", payload=Cluster.class) @Override public String getName();
/** * Gets the value of the configRef property. * * Points to a named config. Needed for stand-alone servers. If server * instance is part of a cluster, then it points to the cluster config * * @return possible object is * {@link String } */ @Attribute @NotNull @NotTargetKeyword(message="{server.reserved.name}", payload=Server.class) @Pattern(regexp = NAME_SERVER_REGEX) @ReferenceConstraint.RemoteKey(message="{resourceref.invalid.configref}", type=Config.class) String getConfigRef();
/** Is the given string a valid package name? */ private boolean isValidPackageName(String fqcn) { int index; if (fqcn.indexOf('.') == -1) { return isValidClassName(fqcn); } while ((index = fqcn.indexOf('.')) != -1) { if (!isValidClassName(fqcn.substring(0, index))) { return false; } fqcn = fqcn.substring(index+1); } return isValidClassName(fqcn); }
private Collection<RemoteKeyInfo> findRemoteKeys(Object o) { Collection<RemoteKeyInfo> result = new ArrayList<RemoteKeyInfo>(); if (o == null) { return result; } findRemoteKeys(o.getClass(), result); return result; }
/** * Gets the value of the storeProtocolClass property. * * @return possible object is * {@link String } */ @Attribute (defaultValue="com.sun.mail.imap.IMAPStore") @JavaClassName public String getStoreProtocolClass();
@NotTargetKeyword(message="{cluster.reserved.name}", payload=Cluster.class) @Pattern(regexp=NAME_SERVER_REGEX, message="{cluster.invalid.name}", payload=Cluster.class) @Override public String getName();
public boolean isValid(final String fullyQualifiedClassName, final ConstraintValidatorContext constraintValidatorContext) { try { return isValidPackageName(fullyQualifiedClassName); } catch (Exception e) { return false; } }
/** Is the given string a valid package name? */ private boolean isValidPackageName(String fqcn) { int index; if (fqcn.indexOf('.') == -1) { return isValidClassName(fqcn); } while ((index = fqcn.indexOf('.')) != -1) { if (!isValidClassName(fqcn.substring(0, index))) { return false; } fqcn = fqcn.substring(index+1); } return isValidClassName(fqcn); }
/** * Gets the value of the transportProtocolClass property. * * @return possible object is * {@link String } */ @Attribute (defaultValue="com.sun.mail.smtp.SMTPTransport") @JavaClassName public String getTransportProtocolClass();
@NotTargetKeyword(message = "{node.reserved.name}", payload = Node.class) @Pattern(regexp = NAME_SERVER_REGEX, message = "{node.invalid.name}", payload = Node.class) @Override public String getName();
/** * Gets the value of the storeProtocolClass property. * * @return possible object is * {@link String } */ @Attribute (defaultValue="com.sun.mail.imap.IMAPStore") @JavaClassName public String getStoreProtocolClass();
@NotTargetKeyword(message="{server.reserved.name}", payload=Server.class) @Pattern(regexp=NAME_SERVER_REGEX, message="{server.invalid.name}", payload=Server.class) @Override public String getName();
/** * Gets the value of the classname property. * Defines the java class which implements this realm * @return possible object is * {@link String } */ @Attribute @NotNull @JavaClassName String getClassname();
@NotTargetKeyword(message="{node.reserved.name}", payload=Node.class) @Pattern(regexp=NAME_SERVER_REGEX, message="{node.invalid.name}", payload=Node.class) @Override public String getName();
/** * Gets the value of the classname property. * Defines the java class which implements this audit module * * @return possible object is * {@link String } */ @Attribute @NotNull @JavaClassName String getClassname();
@NotTargetKeyword(message="{server.reserved.name}", payload=Server.class) @Pattern(regexp=NAME_SERVER_REGEX, message="{server.invalid.name}", payload=Server.class) @Override public String getName();