List of usage examples for javax.resource.spi InvalidPropertyException InvalidPropertyException
public InvalidPropertyException(Throwable cause)
From source file:org.teiid.resource.adapter.ftp.FtpFileConnectionImpl.java
public FtpFileConnectionImpl(FTPClient client, String pathname, Map<String, String> fileMapping) throws ResourceException { this.client = client; if (fileMapping == null) { this.fileMapping = Collections.emptyMap(); } else {// w w w . j a v a2 s . c o m this.fileMapping = fileMapping; } try { if (this.client.cwd(pathname) != 250) { throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$ } this.client.changeWorkingDirectory(pathname); this.mountPoint = VFS.getChild(pathname); this.closeable = VFS.mount(mountPoint, new FtpFileSystem(this.client)); } catch (IOException e) { throw new ResourceException(UTIL.getString("vfs_mount_error", pathname), e); //$NON-NLS-1$ } }