ClientConnector connector, String variableName)
throws UploadException {
session.lock();
try {
if (connector == null) {
throw new UploadException(
"File upload ignored because the connector for the stream variable was not found");
}
if (!connector.isConnectorEnabled()) {
throw new UploadException("Warning: file upload ignored for "
+ connector.getConnectorId()
+ " because the component was disabled");
}
if ((connector instanceof Component)
&& ((Component) connector).isReadOnly()) {
// Only checked for legacy reasons
throw new UploadException(
"File upload ignored because the component is read-only");
}
} finally {
session.unlock();
}