public class FCServerLite extends java.lang.Object implements FCServerIfcExtended
Title: FileCatalyst Direct Server API
Description: Provides server-side API execute remote administrations calls to a FileCatalyst Server
- - - - - - - - - - - - - - - API USAGE: - - - - - - - - - - - - - - -
Example below is a sample code where the application tries to create a user and
wrapps up logic for reconnection attempts should the communication between the ServerAPI
and the Server be severed.
// Call to setup initial connection to FileCatalyst Server
public void init() throws Exception {
FCServer fcserver = new FCServer();
// connection parameters
fcserver.setHostname("localhost");
fcserver.setPort(12400);
fcserver.setUserName("admin");
fcserver.setPassword("system");
// connect
fcserver.connect();
}
// attempts a reconnection
private void reconnect () throws Exception {
try {
fcserver.disconnect();
} catch (Exception e) {
}
fcserver.connect();
}
//
// Method to modify login credentials for a user. If the user does not yet exist, create the
// user as well.
// @param fcUserName FTP Login name
// @param fcPassword Password the user wants to have
// @throws Exception If you cannot connect to the server after 3 attempts, or the server is not allowing you to
// create/modify the user.
//
public void createOrModifyUserCredentials(String fcUserName, String fcPassword) throws Exception {
// Get the FileCatalyst user.
int MAXATTEMPTS = 3;
UserContainer fcUser = null;
int retryAttempts = 0;
while (fcUser == null && retryAttempts < MAXATTEMPTS ) {
// try to connect if we've lost the connection
if (!fcserver.isConnected()) {
reconnect();
}
try {
fcUser = fcserver.getUser(fcUserName);
if (fcUser == null) {
// null return indicates user does not exist -- create
fcserver.addUser(fcUserName, fcPassword);
// test to see if the user is really there
fcserver.resynchConfigurationFiles();
fcUser = fcserver.getUser(fcUserName);
if (fcUser == null) {
throw new Exception("FileCatalyst user could not be created with user name '" + fcUserName + "'");
}
return;
} else {
fcserver.modUserPassword(fcUserName, fcPassword);
return;
}
} catch (Exception e) {
// conection foobared. Let's try again
retryAttempts++;
}
}
throw new Exception("Cannot connect to FCServer, reached max attempts");
}
Other examples are found below:
// execute required remote commands (each command invokes a remote call)
fcserver.addUser("bob", "12345");
fcserver.setUserEnable("bob", false);
fcserver.modUserPassword("bob", "abcde");
// modify several attributes for user (remote call only fired off by modifyUser() method)
UserContainer userCon = fcserver.getUser("bob");
userCon.setFileReadPermissions(false);
userCon.setFullName("Bobby Joe");
userCon.setPriority(UserContainer.USERPRIORITY_LOW); //high
System.out.println("Account will expire: " + userCon.getAccountExpiry());
userCon.setHomeDIR("Z:/data/bob/12345/");
fcserver.modifyUser(userCon);
// force a resynch for configuration files and user data to server (instead of waiting for triggered response in 1-2 seconds)
fcserver.resynchConfigurationFiles();
// slightly more destructive methods
fcserver.killSessionByUserId("bob");
fcserver.delUser("bob");
fcserver.killAllSessions();
Copyright: Copyright (c) 2009
Company: Unlimi-Tech Software Inc.
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.logging.Logger |
logger |
PRODUCT| Constructor and Description |
|---|
FCServerLite()
Default Contructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTemporaryToken(java.lang.String username,
java.lang.String token)
Add a temporary password token for a user.
|
void |
addTempUser(java.lang.String newusername,
java.lang.String newuserpass)
Adds a temporary FC web user to the system.
|
void |
addTempUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir)
Adds a temporary FC web user to the system.
|
void |
addTempUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir,
int userType)
Deprecated.
Adds a temporary user to the system. No setting of any userType will be respected by this method, userType will always
default to a temporary FC web user that has remote directory browsing privileges. Method has been solely kept for legacy reasons.
|
void |
addTempUser(UserContainer user,
java.lang.String password)
Deprecated.
|
void |
addUser(java.lang.String newusername,
java.lang.String newuserpass)
Creates a new user on the remote FC server
|
void |
addUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir)
Creates a new user on the remote FC server with a home directory
|
void |
addUser(UserContainer user,
java.lang.String password)
Deprecated.
|
void |
addUserGroup(UserGroupContainer group)
Add a new UserGroupContainer to the system.
|
java.lang.String |
addVirtualFolder(VirtualFolderContainer virtualFolder)
Add a new VirtualFolderContainer to the system.
|
void |
connect()
Default connect.
|
void |
connect(java.lang.String hostname,
int port,
java.lang.String adminuser,
java.lang.String adminpass)
Connect with the arguments provided.
|
void |
connect(java.lang.String hostname,
int port,
java.lang.String adminuser,
java.lang.String adminpass,
java.lang.String httpScheme)
Connect when a particular HTTP scheme is known.
|
void |
connectNoStatus()
Connects with no status message
|
void |
createVirtualDownloadLinksForTheUser(CreateVirtualDownloadLinksForUserContainer container,
java.lang.String password)
Deprecated.
|
void |
deleteTemporaryToken(java.lang.String username,
java.lang.String token)
Deletes temporary password token for a user.
|
void |
deleteUserGroup(java.lang.String groupName)
Deletes the UserGroupContainer with the given name.
|
void |
deleteVirtualFolder(java.lang.String virtualFolderName)
deletes the VirtualFolderContainer with the given name.
|
void |
delUser(java.lang.String delusername)
Delets a user on the remote FC server
|
void |
delUser(java.lang.String delusername,
boolean deleteHomeDirectory)
Delets a user on the remote FC server and the user's home dir.
|
void |
disconnect()
Disconnct from the FileCatalyst Direct Server
|
void |
enableUserGroup(java.lang.String groupName)
enables the UserGroup with the given name.
|
unlimited.fc.rest.shared.model.dataitem.DataItemsModel |
getAllConfigData()
Returns All Of The Current Server Configurations
|
java.util.Collection<UserContainer> |
getAllUsers() |
protected java.lang.String |
getAuthorization()
Returns the REST Authorization for this server
|
java.util.LinkedList<ClientSessionContainer> |
getClientSessions()
Gets the list of sessions currently running on FileCatalyst Server.
|
unlimited.fc.com.ConfigSourceIfc<unlimited.fc.server.FileCatalystServerInterface> |
getConfigSource() |
java.lang.String |
getConfigValue(java.lang.String configName)
Returns a specific configuration
|
int |
getDefaultIdleTime()
Not yet supported
|
java.util.Collection<FolderGroupCanAccess> |
getFoldersLinkedToGroup(java.lang.String groupname)
Return a list view of folders that is linked to a group along with their
permissions
Each entry contains a specific folder the folder has access to, and
includes permissions granted to the group.
|
java.util.Collection<FolderUserCanAccess> |
getFoldersLinkedToUser(java.lang.String userName)
Returns a list view of links connecting a folder to a user.
|
java.util.Collection<ResourceGrantedToFolder> |
getGroupsLinkedToFolder(java.lang.String virtualFolderName)
Return a list of groups that is linked to a folder along with their
permissions.
|
java.util.Collection<java.lang.String> |
getGroupsLinkedToUser(java.lang.String userName)
Returns group collection linked to user name.
|
java.lang.String |
getHostname()
Returns the host name of the server
|
java.net.URI |
getHTMLAdminURL(boolean bypassServerConfigs)
Returns the current HTML admin URL when called.
|
int |
getHTTPPort()
Get http port.
|
long |
getLastConfigChangeTime()
get last time for configuration change
|
long |
getLastUsersChangeTime()
get last time for configuration change
|
java.lang.String |
getLicenseString()
Returns the server license string
|
java.lang.String |
getPassword()
Returns the password of the server
|
PermissionsContainer |
getPermissionsForGroupAndFolder(java.lang.String groupname,
java.lang.String foldername)
Return a permission container that describes the relationship between the
group and folder.
|
PermissionsContainer |
getPermissionsForUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName)
Permission list that a user has regarding a folder.
|
int |
getPort()
Returns the port of the server
|
int |
getReceiveRateKbps()
Shows kbps rates (receive) of the server
|
java.lang.String |
getRequestString()
Returns the server request string
|
int |
getTotalRateKbps()
Shows kbps rates (total) of the server
|
int |
getTransmitRateKbps()
Shows kbps rates (transmit) of the server
|
UserContainer |
getUser(java.lang.String username)
Get user information from the FileCatalyst Server.
|
int |
getUserCount()
Returns the current user count on the server
|
UserGroupContainer |
getUserGroup(java.lang.String groupName)
UserGroupContainer associated with the entered name.
|
java.util.Collection<UserGroupContainer> |
getUserGroups()
List of UserGroupContainer.
|
java.lang.String |
getUsername()
Returns the user name of the server
|
java.util.Collection<UserContainer> |
getUsers()
Return a collection of the users on the system
|
java.util.Collection<ResourceGrantedToFolder> |
getUsersLinkedToFolder(java.lang.String virtualFolderName)
Return a list of users linked to a folder
|
java.util.Collection<java.lang.String> |
getUsersLinkedToGroup(java.lang.String groupname)
Returns user names linked to group name.
|
VirtualFolderContainer |
getVirtualFolder(java.lang.String virtualFolderName)
returns the VirtualFolderContainer associated with the entered name.
|
java.util.Collection<VirtualFolderContainer> |
getVirtualFolders()
returns the VirtualFolders.
|
unlimited.fc.rest.client.WebResourceConnector |
getWebResourceConnector()
Returns the web resource connector to be used in REST services
|
void |
internalAddSpacesUser(unlimited.fc.rest.server.model.SpacesUserAndVirtualFoldersModel model) |
boolean |
isConnected()
Tests to see if the ServerAPI is connected to the RemoteAdmin.
|
boolean |
isStatusClientDisabled()
Returns true.
|
void |
killAllSessions()
Kill all connected user sessions on the system
|
void |
killSessionBySessionId(java.lang.String sessionID)
Kill specific session connected to the system
|
void |
killSessionByUserId(java.lang.String username)
Kill specific users connected to the system
|
void |
linkGroupAndFolder(java.lang.String groupname,
java.lang.String foldername,
PermissionsContainer permission)
Create access for a group to a virtual folder with a specified permission
set.
|
void |
linkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName,
PermissionsContainer permission)
Links a user to a virtual folder with given permissions
|
void |
linkUserAndGroup(java.lang.String userName,
java.lang.String groupName)
links the User and the UserGroupContainer with the given names.
|
java.lang.String[] |
listUserNames()
Return user name list on the remote FC server
|
UserContainer[] |
listUsers()
Return list of UserContainers from the remote FC server
|
void |
modifyUser(UserContainer modifiedUserContainer)
Modify a user on the remote server.
|
void |
modifyUserGroup(UserGroupContainer group)
modifies the group with the name group.getName with the values of group.
|
void |
modifyVirtualFolder(VirtualFolderContainer virtualFolder)
Modifies the virtual folder with with with the given name.
|
void |
modUserPassword(java.lang.String username,
java.lang.String newpassword)
Modify a user's password on the remote FC server
|
void |
resetAllOverrides()
Resets all bandwidth/priority overrides back to default values.
|
void |
resynchConfigurationFiles()
Configuration or user changes normally prompt a resynchronization between
the Server and the RemoteAdmin.
|
void |
setConfigValue(java.lang.String configName,
java.lang.String configValue)
Sets a specific configuration
|
void |
setDefaultIdleTime(int idleTime)
Not yet supported
|
void |
setHostname(java.lang.String server)
Sets the host name of the server to a new value
|
void |
setLicenseString(java.lang.String newLicense)
Sets the server license key
|
void |
setOverrideBandwidth(java.lang.String sessionID,
int bandwidthKbps)
Sets an override priority for a given client session.
|
void |
setOverridePriority(java.lang.String sessionID,
int priority)
Sets an override priority for a given client session.
|
void |
setPassword(java.lang.String password)
Sets the password of the server to a new value
|
void |
setPort(int port)
Sets the port of the server to a new value
|
protected void |
setSingleDataItem(unlimited.fc.rest.shared.model.dataitem.DataItemModel dim)
Sets a new single data item
|
void |
setStatusClientDisabled(boolean newVal)
for testing.
|
void |
setUserEnable(java.lang.String username,
boolean enabled)
Allows enabling or disabling users on the remote FC server
|
void |
setUserName(java.lang.String username)
Sets the user name of the server to a new value
|
void |
setWebResourceConnector(unlimited.fc.rest.client.WebResourceConnector webResourceConnector)
Sets the web resource connector to be used in REST services
|
void |
unlinkGroupAndFolder(java.lang.String groupname,
java.lang.String foldername)
Remove access of a group to a virtual folder.
|
void |
unlinkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName)
Unlinks a user to a virtual folder.
|
void |
unlinkUserAndGroup(java.lang.String userName,
java.lang.String groupname)
unlinks the User and the UserGroupContainer with the given names.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddUserSanity, createVirtualDownloadLinksForTheUser, createVirtualLinkForUserOnServer, getHTMLAdminURL, getIP, getWebServerBaseURL, translateToIP, translateToIPLazy, validateUserAddedpublic unlimited.fc.rest.client.WebResourceConnector getWebResourceConnector()
public void setWebResourceConnector(unlimited.fc.rest.client.WebResourceConnector webResourceConnector)
webResourceConnector - New web resource to setpublic void connect()
throws java.lang.Exception
connect in interface FCServerIfcjava.lang.Exceptionpublic void connect(java.lang.String hostname,
int port,
java.lang.String adminuser,
java.lang.String adminpass)
throws java.lang.Exception
connect in interface FCServerIfchostname - Hostname or IP of the server you wish to connect toport - HTTP port of the server that you wish to connect toadminuser - Administration username of the serveradminpass - Administration password of the serverjava.lang.Exceptionpublic void connect(java.lang.String hostname,
int port,
java.lang.String adminuser,
java.lang.String adminpass,
java.lang.String httpScheme)
throws java.lang.Exception
hostname - Hostname or IP of the server you wish to connect toport - HTTP port of the server that you wish to connect toadminuser - Administration username of the serveradminpass - Administration password of the serverhttpScheme - HTTP scheme used to communicate with the FC Server. Typically HTTP or HTTPS if SSL is enabledjava.lang.Exceptionpublic void disconnect()
throws java.lang.Exception
disconnect in interface FCServerIfcjava.lang.Exceptionpublic java.lang.String getUsername()
getUsername in interface FCServerIfcpublic java.lang.String getPassword()
getPassword in interface FCServerIfcpublic java.lang.String getHostname()
getHostname in interface FCServerIfcpublic int getPort()
getPort in interface FCServerIfcpublic void setUserName(java.lang.String username)
setUserName in interface FCServerIfcusername - New user name to setpublic void setPassword(java.lang.String password)
setPassword in interface FCServerIfcpassword - New password to setpublic void setHostname(java.lang.String server)
setHostname in interface FCServerIfcserver - New host name to setpublic void setPort(int port)
setPort in interface FCServerIfcport - New port to setpublic void resynchConfigurationFiles()
throws java.lang.Exception
resynchConfigurationFiles in interface FCServerIfcjava.lang.Exception - thrown if you cannot connect to a remote admin.public boolean isConnected()
isConnected in interface FCServerIfcpublic java.lang.String[] listUserNames()
throws java.lang.Exception
listUserNames in interface FCServerIfcjava.lang.Exceptionpublic UserContainer[] listUsers() throws java.lang.Exception
listUsers in interface FCServerIfcExtendedjava.lang.Exception - If unable to convert user into user container (user table
modified while getting user list)public void addUser(java.lang.String newusername,
java.lang.String newuserpass)
throws java.lang.Exception
addUser in interface FCServerIfcnewusername - Stringnewuserpass - Stringjava.lang.Exception - If the user cannot be created on the remote systempublic void addUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir)
throws java.lang.Exception
addUser in interface FCServerIfcnewusername - Stringnewuserpass - Stringnewhomedir - Stringjava.lang.Exception - If the user cannot be created on the remote systempublic void delUser(java.lang.String delusername)
throws java.lang.Exception
delUser in interface FCServerIfcdelusername - String Username that is to be removed from the database.java.lang.Exception - If the user cannot be deleted on the remote systempublic void delUser(java.lang.String delusername,
boolean deleteHomeDirectory)
throws java.lang.Exception
delUser in interface FCServerIfcdelusername - String Username that is to be removed from the database.java.lang.Exception - If the user cannot be deleted on the remote systempublic void setUserEnable(java.lang.String username,
boolean enabled)
throws java.lang.Exception
setUserEnable in interface FCServerIfcusername - Stringenabled - booleanjava.lang.Exception - If the user cannot be modified on the remote systempublic void modUserPassword(java.lang.String username,
java.lang.String newpassword)
throws java.lang.Exception
modUserPassword in interface FCServerIfcusername - Stringnewpassword - Stringjava.lang.Exception - If the user cannot be modified on the remote systempublic void addTemporaryToken(java.lang.String username,
java.lang.String token)
throws java.lang.Exception
addTemporaryToken in interface FCServerIfcusername - Stringnewpassword - Stringjava.lang.Exception - If the user cannot be modified on the remote systempublic void deleteTemporaryToken(java.lang.String username,
java.lang.String token)
throws java.lang.Exception
deleteTemporaryToken in interface FCServerIfcusername - Stringnewpassword - Stringjava.lang.Exception - If the user cannot be modified on the remote systempublic UserContainer getUser(java.lang.String username) throws java.lang.Exception
getUser in interface FCServerIfcusername - String Unique username.java.lang.Exceptionprotected java.lang.String getAuthorization()
public void modifyUser(UserContainer modifiedUserContainer) throws InvalidArgumentException, java.lang.Exception
modifyUser in interface FCServerIfcdata - .user UserContainer User container which has values already
modified.InvalidArgumentException - If user does not exist on the serverjava.lang.Exception - if remote procedure call fails between API and the FC Serverpublic void addUserGroup(UserGroupContainer group) throws java.lang.Exception
addUserGroup in interface FCServerIfcUserGroupContainer - a new user group.java.lang.Exception - *public UserGroupContainer getUserGroup(java.lang.String groupName) throws java.lang.Exception
getUserGroup in interface FCServerIfcgroupName - java.lang.Exceptionpublic java.util.Collection<UserGroupContainer> getUserGroups() throws java.lang.Exception
getUserGroups in interface FCServerIfcjava.lang.Exceptionpublic void modifyUserGroup(UserGroupContainer group) throws java.lang.Exception
modifyUserGroup in interface FCServerIfcgroup - java.lang.Exceptionpublic void deleteUserGroup(java.lang.String groupName)
throws java.lang.Exception
deleteUserGroup in interface FCServerIfcgroupName - java.lang.Exceptionpublic void enableUserGroup(java.lang.String groupName)
throws java.lang.Exception
enableUserGroup in interface FCServerIfcgroupName - java.lang.Exceptionpublic void linkUserAndGroup(java.lang.String userName,
java.lang.String groupName)
throws java.lang.Exception
linkUserAndGroup in interface FCServerIfcuserName - groupName - java.lang.Exceptionpublic void unlinkUserAndGroup(java.lang.String userName,
java.lang.String groupname)
throws java.lang.Exception
unlinkUserAndGroup in interface FCServerIfcuserName - groupName - java.lang.Exceptionpublic java.util.Collection<java.lang.String> getUsersLinkedToGroup(java.lang.String groupname)
throws java.lang.Exception
getUsersLinkedToGroup in interface FCServerIfcgroupName - java.lang.Exceptionpublic java.util.Collection<java.lang.String> getGroupsLinkedToUser(java.lang.String userName)
throws java.lang.Exception
getGroupsLinkedToUser in interface FCServerIfcuserName - java.lang.Exceptionpublic java.lang.String addVirtualFolder(VirtualFolderContainer virtualFolder) throws java.lang.Exception
addVirtualFolder in interface FCServerIfcVirtualFolderContainer - a new virtualFolder.java.lang.Exception - *public VirtualFolderContainer getVirtualFolder(java.lang.String virtualFolderName) throws java.lang.Exception
getVirtualFolder in interface FCServerIfcvirtualFolderName - java.lang.Exceptionpublic java.util.Collection<VirtualFolderContainer> getVirtualFolders() throws java.lang.Exception
getVirtualFolders in interface FCServerIfcjava.lang.Exceptionpublic void modifyVirtualFolder(VirtualFolderContainer virtualFolder) throws java.lang.Exception
modifyVirtualFolder in interface FCServerIfcfolder - java.lang.Exceptionpublic void deleteVirtualFolder(java.lang.String virtualFolderName)
throws java.lang.Exception
deleteVirtualFolder in interface FCServerIfcvirtualFolderName - java.lang.Exceptionpublic void linkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName,
PermissionsContainer permission)
throws java.lang.Exception
linkUserAndFolder in interface FCServerIfcuserName - virtualFolderName - permission - java.lang.Exceptionpublic void unlinkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName)
throws java.lang.Exception
unlinkUserAndFolder in interface FCServerIfcuserName - virtualFolderName - java.lang.Exceptionpublic java.util.Collection<FolderUserCanAccess> getFoldersLinkedToUser(java.lang.String userName) throws java.lang.Exception
getFoldersLinkedToUser in interface FCServerIfcuserName - java.lang.Exceptionpublic java.util.Collection<ResourceGrantedToFolder> getUsersLinkedToFolder(java.lang.String virtualFolderName) throws java.lang.Exception
getUsersLinkedToFolder in interface FCServerIfcvirtualFolderName - java.lang.Exceptionpublic PermissionsContainer getPermissionsForUserAndFolder(java.lang.String userName, java.lang.String virtualFolderName) throws java.lang.Exception
getPermissionsForUserAndFolder in interface FCServerIfcuserName - virtualFolderName - java.lang.Exceptionpublic void linkGroupAndFolder(java.lang.String groupname,
java.lang.String foldername,
PermissionsContainer permission)
throws java.lang.Exception
linkGroupAndFolder in interface FCServerIfcgroupname - Name of the groupfoldername - Folder name (not label), used as PK in the databasepermission - Permission container.java.lang.Exception - Throws exception if group or folder does not exist in
FileCatalyst Serverpublic void unlinkGroupAndFolder(java.lang.String groupname,
java.lang.String foldername)
throws java.lang.Exception
unlinkGroupAndFolder in interface FCServerIfcgroupname - Name of the groupfoldername - Folder name (not label), used as PK in the databasejava.lang.Exception - Throws exception if group or folder does not exist in
FileCatalyst Serverpublic java.util.Collection<FolderGroupCanAccess> getFoldersLinkedToGroup(java.lang.String groupname) throws java.lang.Exception
getFoldersLinkedToGroup in interface FCServerIfcgroupname - Name of the group to query againstjava.lang.Exceptionpublic java.util.Collection<ResourceGrantedToFolder> getGroupsLinkedToFolder(java.lang.String virtualFolderName) throws java.lang.Exception
getGroupsLinkedToFolder in interface FCServerIfcvirtualFolderName - Unique name (PK) of the virtual folder used to identify object in
database.java.lang.Exceptionpublic PermissionsContainer getPermissionsForGroupAndFolder(java.lang.String groupname, java.lang.String foldername) throws java.lang.Exception
getPermissionsForGroupAndFolder in interface FCServerIfcgroupname - foldername - java.lang.Exceptionpublic void setStatusClientDisabled(boolean newVal)
setStatusClientDisabled in interface FCServerIfcExtendednewVal - public void killSessionByUserId(java.lang.String username)
throws java.lang.Exception,
java.lang.IllegalStateException
killSessionByUserId in interface FCServerIfcusername - String Username on the FileCatalyst Direct Serverjava.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public void killAllSessions()
throws java.lang.Exception,
java.lang.IllegalStateException
killAllSessions in interface FCServerIfcjava.lang.IllegalStateException - thrown if status client was explictly disabled.java.lang.Exception - thrown if you cannot connect to a remote admin.public java.util.LinkedList<ClientSessionContainer> getClientSessions() throws java.lang.Exception, java.lang.IllegalStateException
getClientSessions in interface FCServerIfcjava.lang.Exception - Thrown if you cannot connect to the FCServer admin service.java.lang.IllegalStateException - Thrown if status client is explicitly disabled in FCServerAPI.public void setOverridePriority(java.lang.String sessionID,
int priority)
throws InvalidArgumentException,
java.lang.Exception
setOverridePriority in interface FCServerIfcpriority - int value for priority: 1=low, 10=high, 0=no override (default)InvalidArgumentException - Priority value passed in is incorrect (legal values: 0, 1-10)java.lang.Exception - Cannot connect to the remote serverpublic void setOverrideBandwidth(java.lang.String sessionID,
int bandwidthKbps)
throws InvalidArgumentException,
java.lang.Exception
setOverrideBandwidth in interface FCServerIfcbandwidthKbps - int value for override bandwidth.InvalidArgumentException - BandwidthKbps value passed in is incorrect (legal values: >= 0)java.lang.Exception - Cannot connect to the remote serverpublic void resetAllOverrides()
throws java.lang.Exception
resetAllOverrides in interface FCServerIfcjava.lang.Exception - Cannot connect to the remote serverpublic void killSessionBySessionId(java.lang.String sessionID)
throws java.lang.Exception,
java.lang.IllegalStateException
killSessionBySessionId in interface FCServerIfcsessionID - String SessionID on the FileCatalyst Direct Serverjava.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public int getTransmitRateKbps()
throws java.lang.Exception,
java.lang.IllegalStateException
getTransmitRateKbps in interface FCServerIfcjava.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public int getReceiveRateKbps()
throws java.lang.Exception,
java.lang.IllegalStateException
getReceiveRateKbps in interface FCServerIfcjava.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public int getTotalRateKbps()
throws java.lang.Exception,
java.lang.IllegalStateException
getTotalRateKbps in interface FCServerIfcjava.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public long getLastConfigChangeTime()
throws java.lang.Exception,
java.lang.IllegalStateException
java.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public long getLastUsersChangeTime()
throws java.lang.Exception,
java.lang.IllegalStateException
java.lang.Exception - thrown if you cannot connect to a remote admin.java.lang.IllegalStateException - thrown if status client was explictly disabled.public java.lang.String getRequestString()
getRequestString in interface FCServerIfcpublic unlimited.fc.rest.shared.model.dataitem.DataItemsModel getAllConfigData()
public java.lang.String getConfigValue(java.lang.String configName)
configName - Configuration that you would likepublic void setConfigValue(java.lang.String configName,
java.lang.String configValue)
throws java.lang.Exception
configName - Configuration that you would likeconfigValue - Value for the configuration that you are settingjava.lang.Exceptionpublic java.lang.String getLicenseString()
getLicenseString in interface FCServerIfcpublic void setLicenseString(java.lang.String newLicense)
throws java.lang.Exception
setLicenseString in interface FCServerIfcnewLicense - String representing the new license to setjava.lang.Exceptionprotected void setSingleDataItem(unlimited.fc.rest.shared.model.dataitem.DataItemModel dim)
throws java.lang.Exception
dim - DataItem to setjava.lang.Exceptionpublic boolean isStatusClientDisabled()
isStatusClientDisabled in interface FCServerIfcpublic java.util.Collection<UserContainer> getUsers() throws java.lang.Exception
java.lang.Exceptionpublic java.util.Collection<UserContainer> getAllUsers() throws java.lang.Exception
getAllUsers in interface FCServerIfcjava.lang.Exceptionpublic int getUserCount()
throws java.lang.Exception
getUserCount in interface FCServerIfcjava.lang.Exceptionpublic void connectNoStatus()
throws java.lang.Exception
connectNoStatus in interface FCServerIfcjava.lang.Exceptionpublic int getDefaultIdleTime()
getDefaultIdleTime in interface FCServerIfcpublic void setDefaultIdleTime(int idleTime)
setDefaultIdleTime in interface FCServerIfcpublic void addTempUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir)
throws java.lang.Exception
addTempUser in interface FCServerIfcnewusername - Name of the user to be creatednewuserpass - Password for the user to be createdjava.lang.Exceptionpublic void addTempUser(java.lang.String newusername,
java.lang.String newuserpass)
throws java.lang.Exception
addTempUser in interface FCServerIfcnewusername - Name of the user to be creatednewuserpass - Password for the user to be creatednewhomedir - Home directory of the user to be createdjava.lang.Exception@Deprecated
public void addTempUser(java.lang.String newusername,
java.lang.String newuserpass,
java.lang.String newhomedir,
int userType)
throws java.lang.Exception
addTempUser in interface FCServerIfcnewusername - Name of the user to be creatednewuserpass - Password for the user to be creatednewhomedir - Home directory of the user to be createduserType - Ignored. Value always default to TEMPORARY_FC_WEB_USER (3)java.lang.Exceptionpublic int getHTTPPort()
getHTTPPort in interface FCServerIfcpublic java.net.URI getHTMLAdminURL(boolean bypassServerConfigs)
throws java.lang.Exception
FCServerIfcExtendedgetHTMLAdminURL in interface FCServerIfcExtendedbypassServerConfigs - - set to true ignores masquerades and bind all interface on the server and returns an URL that can be used to connect to the HTML Adminjava.lang.Exception - Thrown if remote admin is disabled, if web access is disabled, or the web server can't be reached.public unlimited.fc.com.ConfigSourceIfc<unlimited.fc.server.FileCatalystServerInterface> getConfigSource()
getConfigSource in interface FCServerIfc@Deprecated public void addTempUser(UserContainer user, java.lang.String password) throws AddUserException, ModifyUserException
FCServerIfcExtendedaddTempUser in interface FCServerIfcExtendeduser - UserContainer with all the desired settings for the user. the home directory, user name and password must all have values.password - the user's passwordAddUserException - when failing to add a userModifyUserException - when failing to apply the given settings in the user container to the user@Deprecated public void addUser(UserContainer user, java.lang.String password) throws AddUserException, ModifyUserException
FCServerIfcExtendedaddUser in interface FCServerIfcExtendeduser - UserContainer with all the desired settings for the user. the home directory, user name and password must all have values.password - the user's passwordAddUserException - when failing to add a userModifyUserException - when failing to apply the given settings in the user container to the user@Deprecated public void createVirtualDownloadLinksForTheUser(CreateVirtualDownloadLinksForUserContainer container, java.lang.String password) throws AddUserException, ModifyUserException, AddVirtualFolderException, LinkUserAndFolderException
FCServerIfcExtendedcreateVirtualDownloadLinksForTheUser in interface FCServerIfcExtendedcontainer - container with all relevant info needed to create virtual files linked to a given userpassword - the user passwordAddUserExceptionModifyUserExceptionAddVirtualFolderExceptionLinkUserAndFolderExceptionpublic void internalAddSpacesUser(unlimited.fc.rest.server.model.SpacesUserAndVirtualFoldersModel model)
throws AddUserException,
ModifyUserException,
AddVirtualFolderException,
LinkUserAndFolderException,
unlimited.fc.server.api.FCServerLite.FallbackException
AddUserExceptionModifyUserExceptionAddVirtualFolderExceptionLinkUserAndFolderExceptionunlimited.fc.server.api.FCServerLite.FallbackExceptionCopyright © 2015 Unlimi-Tech Sofware Inc. All Rights Reserved.