Package com.uc4.util

Class FolderImpl

  • All Implemented Interfaces:
    IFolder

    public class FolderImpl
    extends java.lang.Object
    implements IFolder
    Implementation of the folder interface
    • 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
      void addChild​(FolderImpl folder)
      Adds a child to this folder
      boolean equals​(java.lang.Object other)  
      java.lang.String fullPath()
      Returns the full path of this folder.
      java.lang.String getId()
      Returns the ID of the folder.
      java.lang.String getName()
      Returns the name of the folder.
      IFolder getParent()
      Returns the parent folder of this folder.
      java.lang.String getParentId()
      Returns the ID of the parent folder.
      IFolder getSubFolder​(java.lang.String folderName, boolean recursive)
      Returns a subfolder with the specified name.
      java.lang.String getTitle()
      Returns the title of the folder.
      java.lang.String getType()
      Returns the type of this folder CLNT ...
      int hashCode()  
      void setParent​(IFolder parent)
      Sets the parent folder
      java.util.Iterator<IFolder> subfolder()
      Returns an iterator for subfolders Each object in the list implements the IFolder interface.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 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 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: IFolder
        Returns the ID of the folder.
        Specified by:
        getId in interface IFolder
        Returns:
        ID
      • getName

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

        public java.lang.String getTitle()
        Description copied from interface: IFolder
        Returns the title of the folder.
        Specified by:
        getTitle in interface IFolder
        Returns:
        title
      • 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:
        equals in class java.lang.Object
      • hashCode

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

        public IFolder getSubFolder​(java.lang.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 java.util.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getType

        public java.lang.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