Package com.uc4.util

Class FolderImpl

java.lang.Object
com.uc4.util.FolderImpl
All Implemented Interfaces:
IFolder

public class FolderImpl extends Object implements IFolder
Implementation of the folder interface
  • Constructor Details

    • FolderImpl

      public FolderImpl(String name, String title, String id, String parentId, String type)
      Constructs a new folder using the specified name, id and parent id.
      Parameters:
      name - Name of the folder
      title - Title of the folder
      id - String containing the ID of the folder
      parentId - String containing the ID of the parent folder
      type - Type of the folder
  • Method Details

    • addChild

      public void addChild(FolderImpl folder)
      Adds a child to this folder
      Parameters:
      folder - Folder which should be added as child
    • getId

      public String getId()
      Description copied from interface: IFolder
      Returns the ID of the folder.
      Specified by:
      getId in interface IFolder
      Returns:
      ID
    • getName

      public String getName()
      Description copied from interface: IFolder
      Returns the name of the folder.
      Specified by:
      getName in interface IFolder
      Returns:
      name
    • getTitle

      public String getTitle()
      Description copied from interface: IFolder
      Returns the title of the folder.
      Specified by:
      getTitle in interface IFolder
      Returns:
      title
    • getParentId

      public 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(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getSubFolder

      public IFolder getSubFolder(String folderName, boolean recursive)
      Description copied from interface: IFolder
      Returns a subfolder with the specified name.
      Specified by:
      getSubFolder in interface IFolder
      Parameters:
      folderName - Name of the subfolder
      recursive - true if recursive false otherwise
      Returns:
      object which implements IFolder
    • subfolder

      public Iterator<IFolder> subfolder()
      Description copied from interface: IFolder
      Returns an iterator for subfolders Each object in the list implements the IFolder interface. If there are no subfolders this method returns null.
      Specified by:
      subfolder in interface IFolder
      Returns:
      list of subfolders
    • getParent

      public IFolder getParent()
      Description copied from interface: IFolder
      Returns the parent folder of this folder.
      Specified by:
      getParent in interface IFolder
      Returns:
      parent folder
    • fullPath

      public String fullPath()
      Description copied from interface: IFolder
      Returns the full path of this folder. Each folder is separated by a /
      Specified by:
      fullPath in interface IFolder
      Returns:
      path
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getType

      public String getType()
      Description copied from interface: IFolder
      Returns 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
      Specified by:
      getType in interface IFolder
      Returns:
      Folder type