use of com.axway.ats.core.validation.Validator in project ats-framework by Axway.
the class SystemOperations method isListening.
/**
* Check if some process is listening on some port on some host.
* Note that we cannot give the name of the listening process.
*
* @param host host address
* @param port port number
* @param timeout timeout value in milliseconds
* @return <code>true</code> if the address is listening on this port
* @throws SystemOperationException when the target host is unknown
*/
@PublicAtsApi
public boolean isListening(@Validate(name = "host", type = ValidationType.STRING_NOT_EMPTY) String host, @Validate(name = "port", type = ValidationType.NUMBER_PORT_NUMBER) int port, @Validate(name = "timeout", type = ValidationType.NUMBER_POSITIVE) int timeout) {
// validate input parameters
new Validator().validateMethodParameters(new Object[] { host, port, timeout });
// execute action
ISystemOperations operations = getOperationsImplementationFor(atsAgent);
return operations.isListening(host, port, timeout);
}
use of com.axway.ats.core.validation.Validator in project ats-framework by Axway.
the class RegistryOperations method setLongValue.
/**
* Applies a Long(REG_QWORD) value on the specified key.
*
* The key will be created if does not exist.
* The key type will be changed if needed.
*
* @param keyPath path to the key
* @param keyName name of the key
* @param keyValue the new key value
*/
@PublicAtsApi
public void setLongValue(@Validate(name = "keyPath", type = ValidationType.STRING_NOT_EMPTY) String keyPath, @Validate(name = "keyName", type = ValidationType.STRING_NOT_EMPTY) String keyName, @Validate(name = "keyValue", type = ValidationType.NONE) long keyValue) {
// validate input parameters
new Validator().validateMethodParameters(new Object[] { keyPath, keyName, keyValue });
registryOperationsImpl.setLongValue(rootKey, keyPath, keyName, keyValue);
}
use of com.axway.ats.core.validation.Validator in project ats-framework by Axway.
the class RegistryOperations method setBinaryValue.
/**
* Applies a Binary(REG_BINARY) value on the specified key.
*
* The key will be created if does not exist.
* The key type will be changed if needed.
*
* @param keyPath path to the key
* @param keyName name of the key
* @param keyValue the new key value
*/
@PublicAtsApi
public void setBinaryValue(@Validate(name = "keyPath", type = ValidationType.STRING_NOT_EMPTY) String keyPath, @Validate(name = "keyName", type = ValidationType.STRING_NOT_EMPTY) String keyName, @Validate(name = "keyValue", type = ValidationType.NOT_NULL) byte[] keyValue) {
// validate input parameters
new Validator().validateMethodParameters(new Object[] { keyPath, keyName, keyValue });
registryOperationsImpl.setBinaryValue(rootKey, keyPath, keyName, keyValue);
}
use of com.axway.ats.core.validation.Validator in project ats-framework by Axway.
the class RegistryOperations method setStringValue.
/**
* Applies a String(REG_SZ) value on the specified key.
*
* The key will be created if does not exist.
* The key type will be changed if needed.
*
* @param keyPath path to the key
* @param keyName name of the key
* @param keyValue the new key value
*/
@PublicAtsApi
public void setStringValue(@Validate(name = "keyPath", type = ValidationType.STRING_NOT_EMPTY) String keyPath, @Validate(name = "keyName", type = ValidationType.STRING_NOT_EMPTY) String keyName, @Validate(name = "keyValue", type = ValidationType.NOT_NULL) String keyValue) {
// validate input parameters
new Validator().validateMethodParameters(new Object[] { keyPath, keyName, keyValue });
registryOperationsImpl.setStringValue(rootKey, keyPath, keyName, keyValue);
}
use of com.axway.ats.core.validation.Validator in project ats-framework by Axway.
the class RegistryOperations method setIntValue.
/**
* Applies a Integer(REG_DWORD) value on the specified key.
*
* The key will be created if does not exist.
* The key type will be changed if needed.
*
* @param keyPath path to the key
* @param keyName name of the key
* @param keyValue the new key value
*/
@PublicAtsApi
public void setIntValue(@Validate(name = "keyPath", type = ValidationType.STRING_NOT_EMPTY) String keyPath, @Validate(name = "keyName", type = ValidationType.STRING_NOT_EMPTY) String keyName, @Validate(name = "keyValue", type = ValidationType.NONE) int keyValue) {
// validate input parameters
new Validator().validateMethodParameters(new Object[] { keyPath, keyName, keyValue });
registryOperationsImpl.setIntValue(rootKey, keyPath, keyName, keyValue);
}
Aggregations