Class VirtualFolderContainer

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<VirtualFolderContainer>

    public class VirtualFolderContainer
    extends java.lang.Object
    implements java.lang.Cloneable, java.lang.Comparable<VirtualFolderContainer>

    Title: FileCatalyst Direct Server API

    Description: Container class that holds virtual folder data. Allows viewing of Virtual Folders by API caller without exposing the inner VirtualFolder classes.

    Copyright: Copyright (c) 2013

    Company: Unlimi-Tech Software Inc.

    Since:
    v3.1
    Version:
    1.0
    Author:
    Christian Charette, ccharette
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UNNAMED_VFOLDER  
    • Constructor Summary

      Constructors 
      Constructor Description
      VirtualFolderContainer​(java.lang.String name, java.lang.String label, java.lang.String path, java.lang.String description, unlimited.fc.rest.server.type.VirtualPathTargetType type)
      Constructor used by test classes, allows insertion of database key for path.
      VirtualFolderContainer​(java.lang.String label, java.lang.String path, java.lang.String description, unlimited.fc.rest.server.type.VirtualPathTargetType type)
      Default constructor used by customer wanting to add a new virtual folder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      VirtualFolderContainer clone()
      Close the VirtualFolderContainer
      int compareTo​(VirtualFolderContainer o)
      Custom compare to method for this object
      boolean equals​(java.lang.Object obj)
      Custom equals operation for this object
      java.lang.String getDescription()
      Returns the description of the virtual folder
      java.lang.String getLabel()
      Get the VirtualFolder label.
      java.lang.String getName()
      Returns the PK of the VirtualFolder in the database.
      java.lang.String getPath()
      Get the file system path where the virtual folder resides.
      unlimited.fc.rest.server.type.VirtualPathTargetType getType()  
      unlimited.fc.server.api.LinkState.UsageState getUsage()
      Get the state of the VirtualFolder usage.
      boolean isTemp()
      Get Wheither Or Not This Virtual File Is Temporary
      boolean isUnnamed()
      Returns true if the virtual folder is unnamed.
      boolean isUserDeletable()
      return true if this is deletable.
      void setDescription​(java.lang.String description)
      Set the description for the virtual folder.
      void setLabel​(java.lang.String label)
      Set the VirtualFolder label to another value.
      void setPath​(java.lang.String path)
      Sets the path where the virtual folder resides.
      void setTemp​(boolean temp)
      Set Wheither Or Not This Virtual File Is Temporary
      void setType​(unlimited.fc.rest.server.type.VirtualPathTargetType type)  
      void setUserDeletable​(boolean deletable)
      set true if this is deletable.
      java.lang.String toString()
      Write out VirtualFolderContainer object to string.
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • VirtualFolderContainer

        public VirtualFolderContainer​(java.lang.String label,
                                      java.lang.String path,
                                      java.lang.String description,
                                      unlimited.fc.rest.server.type.VirtualPathTargetType type)
        Default constructor used by customer wanting to add a new virtual folder.
        Parameters:
        label - logical path presented as a sub-directory in the user home dir when they are granted access (ie: storage).
        path - physical path on the machine (ie: C:\foo\bar\)
        description - Comment on the virtualfolder to give context to the admin
      • VirtualFolderContainer

        public VirtualFolderContainer​(java.lang.String name,
                                      java.lang.String label,
                                      java.lang.String path,
                                      java.lang.String description,
                                      unlimited.fc.rest.server.type.VirtualPathTargetType type)
        Constructor used by test classes, allows insertion of database key for path. Not required by server API.
        Parameters:
        name -
        label -
        path -
        description -
    • Method Detail

      • clone

        public VirtualFolderContainer clone()
        Close the VirtualFolderContainer
        Overrides:
        clone in class java.lang.Object
        Returns:
        Lotsa Stormtroopers
      • getName

        public java.lang.String getName()
        Returns the PK of the VirtualFolder in the database.
        Returns:
        the name
      • getDescription

        public java.lang.String getDescription()
        Returns the description of the virtual folder
        Returns:
        the description
      • setDescription

        public void setDescription​(java.lang.String description)
        Set the description for the virtual folder.
        Parameters:
        description - the description to set
      • getLabel

        public java.lang.String getLabel()
        Get the VirtualFolder label. This is the subdirectory name presented to the user which they can CD into to access files.
        Returns:
        the label
      • setLabel

        public void setLabel​(java.lang.String label)
        Set the VirtualFolder label to another value.
        Parameters:
        label - the label to set
      • getPath

        public java.lang.String getPath()
        Get the file system path where the virtual folder resides. Note that the path will contain forward "/" slashes even on Windows environments
        Returns:
        the path
      • isTemp

        public boolean isTemp()
        Get Wheither Or Not This Virtual File Is Temporary
        Returns:
        the temp
      • setTemp

        public void setTemp​(boolean temp)
        Set Wheither Or Not This Virtual File Is Temporary
        Parameters:
        temp - the temp to set
      • isUserDeletable

        public boolean isUserDeletable()
        return true if this is deletable.
        Returns:
      • setUserDeletable

        public void setUserDeletable​(boolean deletable)
        set true if this is deletable.
        Parameters:
        deletable - boolean
      • setPath

        public void setPath​(java.lang.String path)
        Sets the path where the virtual folder resides. Backward path separators "\" (used by default in Windows environments) are converted to use forward slash path separators "/".
        Parameters:
        path - the path to set
      • getType

        public unlimited.fc.rest.server.type.VirtualPathTargetType getType()
      • setType

        public void setType​(unlimited.fc.rest.server.type.VirtualPathTargetType type)
      • toString

        public java.lang.String toString()
        Write out VirtualFolderContainer object to string. Used for debugging.
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • equals

        public boolean equals​(java.lang.Object obj)
        Custom equals operation for this object
        Overrides:
        equals in class java.lang.Object
      • getUsage

        public unlimited.fc.server.api.LinkState.UsageState getUsage()
        Get the state of the VirtualFolder usage.
        Returns:
        the usage
      • isUnnamed

        public boolean isUnnamed()
        Returns true if the virtual folder is unnamed. This happens if a new VirtualFolder was created but was not inserted into the database. VFolders returned by the FCServerAPI should always contain the database primary key.
        Returns:
        if the folder is unnamed.