Examples of DirectoryImpl


Examples of fr.soleil.salsa.entity.impl.DirectoryImpl

        return result;
    }

    private IDirectory findDirectory(IDirectory root, List<String> path) {

        DirectoryImpl dummy = new DirectoryImpl();
        List<IDirectory> dummySubs = new ArrayList<IDirectory>();
        dummySubs.add(root);
        dummy.setSubDirectoriesList(dummySubs);

        IDirectory result = dummy;
        while (path.size() != 0) {
            String name = path.get(0);
            IDirectory d = findSubDirectory(result, name);
View Full Code Here

Examples of fr.soleil.salsa.entity.impl.DirectoryImpl

     *            : the identifier of the directory
     * @return Directory
     */
    public IDirectory getDirectoryById(Integer directoryId, boolean recursive) {

        DirectoryImpl directory = null;
        String query = "SELECT * FROM directory where directoryid=" + directoryId;

        try {
            startOperation();
            if (stmt != null) {
                ResultSet rs = stmt.executeQuery(query);

                while (rs.next()) {

                    directory = new DirectoryImpl();
                    directory.setId(rs.getInt("directoryid"));
                    directory.setName(rs.getString("name"));
                    directory.setPositionInDirectory(rs.getInt("positionInDirectory"));
                    directory.setTimestamp(rs.getTimestamp("timestamp"));
                    Integer dir = rs.getInt("directory");

                    if (dir != null && !rs.wasNull()) {
                        IDirectory parent = getDirectoryById(dir, recursive);
                        directory.setDirectory(parent);
                    }
                }
                rs.close();
                stmt.clearBatch();
            }
        } catch (SQLException e) {
            CommonsJDBC.catchException(e);
        } finally {
            doCloseConn();
        }
        if (recursive && directory != null && directory.getDirectory() != null) {
            directory.setDirectory(getDirectoryById(directory.getDirectory().getId(), recursive));
        }

        return directory;
    }
View Full Code Here

Examples of org.apache.aries.application.utils.filesystem.impl.DirectoryImpl

  {
    IDirectory dir = null;
   
    if (fs.exists()) {
      if (fs.isDirectory()) {
        dir = new DirectoryImpl(fs, fs);
      } else if (fs.isFile()) {
        try {
          dir = new ZipDirectory(fs, fs);
        } catch (IOException e) {
          _logger.error ("IOException in IDirectory.getFSRoot", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.