Package com.uc4.util
Class FolderImpl
- java.lang.Object
-
- com.uc4.util.FolderImpl
-
-
Constructor Summary
Constructors Constructor Description FolderImpl(java.lang.String name, java.lang.String title, java.lang.String id, java.lang.String parentId, java.lang.String type)Constructs a new folder using the specified name, id and parent id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(FolderImpl folder)Adds a child to this folderbooleanequals(java.lang.Object other)java.lang.StringfullPath()Returns the full path of this folder.java.lang.StringgetId()Returns the ID of the folder.java.lang.StringgetName()Returns the name of the folder.IFoldergetParent()Returns the parent folder of this folder.java.lang.StringgetParentId()Returns the ID of the parent folder.IFoldergetSubFolder(java.lang.String folderName, boolean recursive)Returns a subfolder with the specified name.java.lang.StringgetTitle()Returns the title of the folder.java.lang.StringgetType()Returns the type of this folder CLNT ...inthashCode()voidsetParent(IFolder parent)Sets the parent folderjava.util.Iterator<IFolder>subfolder()Returns an iterator for subfolders Each object in the list implements theIFolderinterface.java.lang.StringtoString()
-
-
-
Constructor Detail
-
FolderImpl
public FolderImpl(java.lang.String name, java.lang.String title, java.lang.String id, java.lang.String parentId, java.lang.String type)Constructs a new folder using the specified name, id and parent id.- Parameters:
name- Name of the foldertitle- Title of the folderid- String containing the ID of the folderparentId- String containing the ID of the parent foldertype- Type of the folder
-
-
Method Detail
-
addChild
public void addChild(FolderImpl folder)
Adds a child to this folder- Parameters:
folder- Folder which sould be added as child
-
getId
public java.lang.String getId()
Description copied from interface:IFolderReturns the ID of the folder.
-
getName
public java.lang.String getName()
Description copied from interface:IFolderReturns the name of the folder.
-
getTitle
public java.lang.String getTitle()
Description copied from interface:IFolderReturns the title of the folder.
-
getParentId
public java.lang.String getParentId()
Returns the ID of the parent folder.- Returns:
- String containing the ID of the parent folder
-
setParent
public void setParent(IFolder parent)
Sets the parent folder- Parameters:
parent- Parent folder
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getSubFolder
public IFolder getSubFolder(java.lang.String folderName, boolean recursive)
Description copied from interface:IFolderReturns a subfolder with the specified name.- Specified by:
getSubFolderin interfaceIFolder- Parameters:
folderName- Name of the subfolderrecursive-trueif recursivefalseotherwise- Returns:
- object which implements
IFolder
-
subfolder
public java.util.Iterator<IFolder> subfolder()
Description copied from interface:IFolderReturns an iterator for subfolders Each object in the list implements theIFolderinterface. If there are no subfolders this method returnsnull.
-
getParent
public IFolder getParent()
Description copied from interface:IFolderReturns the parent folder of this folder.
-
fullPath
public java.lang.String fullPath()
Description copied from interface:IFolderReturns the full path of this folder. Each folder is separated by a /
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getType
public java.lang.String getType()
Description copied from interface:IFolderReturns the type of this folder- CLNT ... Client, Root folder, exists only once
- NFOLD ... No Folder, exists only once
- FAV ... Favorites folder, exists only once
- USERF ... User favorites
- USRGF ... User Group favorites
- TRANSCASE ... Transport folder
- VERSCONTROL ... Version Management folder
- RCNT ... Recent Objects
- TRASH ... Recycle Bin
- FOLD ... Normal folder
-
-