Package unlimited.fc.server.api
Class VirtualFolderContainer
- java.lang.Object
-
- unlimited.fc.server.api.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVirtualFolderContainer.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUNNAMED_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 VirtualFolderContainerclone()Close the VirtualFolderContainerintcompareTo(VirtualFolderContainer o)Custom compare to method for this objectbooleanequals(java.lang.Object obj)Custom equals operation for this objectjava.lang.StringgetDescription()Returns the description of the virtual folderjava.lang.StringgetLabel()Get the VirtualFolder label.java.lang.StringgetName()Returns the PK of the VirtualFolder in the database.java.lang.StringgetPath()Get the file system path where the virtual folder resides.unlimited.fc.rest.server.type.VirtualPathTargetTypegetType()unlimited.fc.server.api.LinkState.UsageStategetUsage()Get the state of the VirtualFolder usage.booleanisTemp()Get Wheither Or Not This Virtual File Is TemporarybooleanisUnnamed()Returns true if the virtual folder is unnamed.booleanisUserDeletable()return true if this is deletable.voidsetDescription(java.lang.String description)Set the description for the virtual folder.voidsetLabel(java.lang.String label)Set the VirtualFolder label to another value.voidsetPath(java.lang.String path)Sets the path where the virtual folder resides.voidsetTemp(boolean temp)Set Wheither Or Not This Virtual File Is TemporaryvoidsetType(unlimited.fc.rest.server.type.VirtualPathTargetType type)voidsetUserDeletable(boolean deletable)set true if this is deletable.java.lang.StringtoString()Write out VirtualFolderContainer object to string.
-
-
-
Field Detail
-
UNNAMED_VFOLDER
public static final java.lang.String UNNAMED_VFOLDER
- See Also:
- Constant Field Values
-
-
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:
clonein classjava.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:
toStringin classjava.lang.Object- Returns:
- String
-
equals
public boolean equals(java.lang.Object obj)
Custom equals operation for this object- Overrides:
equalsin classjava.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.
-
compareTo
public int compareTo(VirtualFolderContainer o)
Custom compare to method for this object- Specified by:
compareToin interfacejava.lang.Comparable<VirtualFolderContainer>
-
-