站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

VcsDirContainer (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore
Class VcsDirContainer

java.lang.Object
  extended byorg.netbeans.modules.vcscore.VcsDirContainer

public class VcsDirContainer
extends Object

Container for objects belonging to directories. Is needed to store data when downloading directory recursively.


Constructor Summary
VcsDirContainer()
          Creates new empty VcsDirContainer
VcsDirContainer(String path)
          Creates new VcsDirContainer with given path.
 
Method Summary
 VcsDirContainer addSubdir(String path)
          Add a subdirectory with the given path.
 VcsDirContainer addSubdirRecursive(String path)
          Add a subdirectory tree with the given path.
 VcsDirContainer getContainerWithPath(String path)
          Get the container of the given path.
 VcsDirContainer getDirContainer(String name)
          Get the directory container of subdirectory of the given name.
 Object getElement()
          Get the element belonging to this directory.
 String getName()
          Get the name of this directory.
 VcsDirContainer getParent(String path)
          Get the parent directory container.
 String getPath()
          Get the directory path.
 VcsDirContainer getSubdir(String path)
          Get the subdirectory with the given path.
 VcsDirContainer[] getSubdirContainers()
          Get all subdirectories.
 String[] getSubdirs()
          Get all subdirectories of this directory.
 void setElement(Object element)
          Set the element object belonging to this directory.
 void setName(String name)
          Set the name of this directory.
 void setPath(String path)
          Set the directory path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VcsDirContainer

public VcsDirContainer()
Creates new empty VcsDirContainer


VcsDirContainer

public VcsDirContainer(String path)
Creates new VcsDirContainer with given path.

Parameters:
path - the directory path.
Method Detail

getPath

public String getPath()
Get the directory path.

Returns:
the directory path

setPath

public void setPath(String path)
Set the directory path.

Parameters:
path - the directory path

getName

public String getName()
Get the name of this directory.

Returns:
the name of this directory

setName

public void setName(String name)
Set the name of this directory.

Parameters:
name - the name of this directory

setElement

public void setElement(Object element)
Set the element object belonging to this directory.

Parameters:
element - the element to assign

getElement

public Object getElement()
Get the element belonging to this directory.

Returns:
the element or null for empty folders.

getSubdir

public VcsDirContainer getSubdir(String path)
Get the subdirectory with the given path.

Returns:
the subdirectory or null if does not exist.

getSubdirContainers

public VcsDirContainer[] getSubdirContainers()
Get all subdirectories.

Returns:
the array of subdirectories.

addSubdir

public VcsDirContainer addSubdir(String path)
Add a subdirectory with the given path.

Parameters:
path - the path of new directory
Returns:
new directory container

addSubdirRecursive

public VcsDirContainer addSubdirRecursive(String path)
Add a subdirectory tree with the given path. Necessary intermediate directories are created.

Parameters:
path - the path of new directory
Returns:
new directory container or null when the path is bad

getSubdirs

public String[] getSubdirs()
Get all subdirectories of this directory.

Returns:
an array of subdirectories' names

getDirContainer

public VcsDirContainer getDirContainer(String name)
Get the directory container of subdirectory of the given name.

Parameters:
name - the directory name to look for
Returns:
the directory container of the given name, or null when the directory name does not exist.

getContainerWithPath

public VcsDirContainer getContainerWithPath(String path)
Get the container of the given path.

Parameters:
path - return the container of the given path or null when not found

getParent

public VcsDirContainer getParent(String path)
Get the parent directory container.

Parameters:
path - the directory path of which the container we are looking for
Returns:
the parent directory container, or null when not found

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.