public class FCServer 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();
// if you are creating multiple instances of an FCServer in a multi-threaded environment
// use an instance of FCServerShared instead
// FCServerIfcExtended fcserver = new FCServerShared();
//
// ---connection parameters---
fcserver.setHostname("localhost");
fcserver.setPort(12400);
fcserver.setUserName("admin");
fcserver.setPassword("system");
// connect with the default timeout of 0
fcserver.connect();
}
// attempts a reconnection
private void reconnect () throws Exception {
try {
fcserver.disconnect();
} catch (Exception e) {
}
// connect with the default timeout of 0
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 |
|---|
FCServer()
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 |
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 |
addUserGroup(UserGroupContainer group)
Add a new UserGroupContainer to the system.
|
java.lang.String |
addVirtualFolder(VirtualFolderContainer virtualFolder)
Add a new VirtualFolderContainer to the system.
|
void |
clearBlockedUser(java.lang.String username)
Command to the server to clear a temporarily blocked user from being able to login
|
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,
int connectTimeoutSec)
Connect with the arguments provided.
|
void |
connectNoStatus()
Special connect process that disables the status client.
|
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)
Deletes a user on the remote FC server
|
void |
delUser(java.lang.String delusername,
boolean deleteHomeDirectory)
Deletes a user on the remote FC server and the user's home dir.
|
void |
disconnect()
Disconnects from the FileCatalyst Direct Server
|
void |
enableUserGroup(java.lang.String groupName)
Enables the UserGroup with the given name.
|
java.util.Collection<UserContainer> |
getAllUsers() |
java.util.LinkedList<ClientSessionContainer> |
getClientSessions()
Gets the list of sessions currently running on FileCatalyst Server.
|
unlimited.fc.com.ConfigSourceIfc<unlimited.fc.server.FileCatalystServerInterface> |
getConfigSource()
Method used for testing and integration with JUnit.
|
int |
getDefaultIdleTime()
Returns the default time
|
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 IP address / hostname of the server
|
java.net.URI |
getHTMLAdminURL(boolean bypassServerConfigs)
Returns the current HTML admin URL when called.
|
int |
getHTTPPort()
Get http port.
|
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 amount of users that are on the system
|
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 username of the server
|
java.util.Collection<unlimited.fc.entity.user.User> |
getUsers()
Returns the current users on the server
|
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.
|
boolean |
isConnected()
Tests to see if the ServerAPI is connected to the RemoteAdmin.
|
boolean |
isStatusClientDisabled()
Returns whether or not the status client is disabled
|
boolean |
isUserBlocked(java.lang.String username)
Used to find out if a user is marked as temporarily blocked by system.
|
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 folder)
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 |
setDefaultIdleTime(int idleTime)
Sets the default idle time to whatever value is specified
|
void |
setDeliveryTime(java.lang.String sessionID,
long deliveryTime)
Sets a delivery time for a given client session.
|
void |
setHostname(java.lang.String server)
Sets the hostname on the server
|
void |
setLicenseString(java.lang.String newLicense)
Sets the server license key
|
void |
setOverrideBandwidth(java.lang.String sessionID,
int bandwidthKbps)
Sets an override bandwidth 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 on the server
|
void |
setPort(int port)
Sets the port on the server
|
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 on the server
|
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, waitaddTempUser, addUser, addUserSanity, createVirtualDownloadLinksForTheUser, createVirtualDownloadLinksForTheUser, createVirtualLinkForUserOnServer, getHTMLAdminURL, getIP, getWebServerBaseURL, translateToIP, translateToIPLazy, validateUserAddedpublic void connectNoStatus()
throws java.lang.Exception
connectNoStatus in interface FCServerIfcjava.lang.Exceptionpublic 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 - IP address of the server that you wish to connect toport - Port of the server that you wish to connect toadminuser - Administrator user name of the server that you are connecting toadminpass - Administrator password of the server that you are connecting tojava.lang.Exceptionpublic void connect(java.lang.String hostname,
int port,
java.lang.String adminuser,
java.lang.String adminpass,
int connectTimeoutSec)
throws java.lang.Exception
hostname - IP address of the server that you wish to connect toport - Port of the server that you wish to connect toadminuser - Administrator user name of the server that you are connecting toadminpass - Administrator password of the server that you are connecting toconnectTimeout - int timeout before returning an error on connection (if server is not there). < 0 implies JAVA timeout defaults.java.lang.Exceptionpublic void disconnect()
throws java.lang.Exception
disconnect in interface FCServerIfcjava.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 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 username 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 hostname 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 - Username of the new user to addnewuserpass - Password of the new user to addjava.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 - Username of the new user to addnewuserpass - Password of the new user to addnewhomedir - Custom home directory of the new userjava.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.deleteHomeDirectory - Whether or not the home directory should also be deletedjava.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 - User to access on the serverenabled - Whether or not the user is enabledjava.lang.Exception - If the user cannot be modified on the remote systempublic void clearBlockedUser(java.lang.String username)
throws java.lang.Exception
username - Username of the user you would like to clearjava.lang.Exceptionpublic boolean isUserBlocked(java.lang.String username)
username - Username of the user that you would to know if they are blockedpublic void modUserPassword(java.lang.String username,
java.lang.String newpassword)
throws java.lang.Exception
modUserPassword in interface FCServerIfcusername - Username of the user you would like to modify the password fornewpassword - The new password that you would like to setjava.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 - Username of usertoken - Login tokenjava.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 - Username of the user you would like to delete the token fromtoken - Token that you wish to deletejava.lang.Exception - If the user cannot be modified on the remote systempublic UserContainer getUser(java.lang.String username)
getUser in interface FCServerIfcusername - Unique username.public void modifyUser(UserContainer modifiedUserContainer) throws InvalidArgumentException, java.lang.Exception
modifyUser in interface FCServerIfcmodifiedUserContainer - 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 - Name of group you wish to retrievejava.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 - User group that you would like to modifyjava.lang.Exceptionpublic void deleteUserGroup(java.lang.String groupName)
throws java.lang.Exception
deleteUserGroup in interface FCServerIfcgroupName - Given user group that you would like to deletejava.lang.Exceptionpublic void enableUserGroup(java.lang.String groupName)
throws java.lang.Exception
enableUserGroup in interface FCServerIfcgroupName - User group name that you would like to enablejava.lang.Exceptionpublic void linkUserAndGroup(java.lang.String userName,
java.lang.String groupName)
throws java.lang.Exception
linkUserAndGroup in interface FCServerIfcuserName - User that you would like to linkgroupName - User Group that you would like to link tojava.lang.Exceptionpublic void unlinkUserAndGroup(java.lang.String userName,
java.lang.String groupName)
throws java.lang.Exception
unlinkUserAndGroup in interface FCServerIfcuserName - User that you would like to unlinkgroupName - User Group that you would like to unlink fromjava.lang.Exceptionpublic java.util.Collection<java.lang.String> getUsersLinkedToGroup(java.lang.String groupName)
throws java.lang.Exception
getUsersLinkedToGroup in interface FCServerIfcgroupName - Name of user group that you wish to retrieve the users forjava.lang.Exceptionpublic java.util.Collection<java.lang.String> getGroupsLinkedToUser(java.lang.String userName)
throws java.lang.Exception
getGroupsLinkedToUser in interface FCServerIfcuserName - Username of the user that you would like the groups forjava.lang.Exceptionpublic java.lang.String addVirtualFolder(VirtualFolderContainer virtualFolder) throws java.lang.Exception
addVirtualFolder in interface FCServerIfcvirtualFolder - A new virtualFolder.java.lang.Exception - *public VirtualFolderContainer getVirtualFolder(java.lang.String virtualFolderName) throws java.lang.Exception
getVirtualFolder in interface FCServerIfcvirtualFolderName - Name of a virtual folder that you would likejava.lang.Exceptionpublic java.util.Collection<VirtualFolderContainer> getVirtualFolders() throws java.lang.Exception
getVirtualFolders in interface FCServerIfcjava.lang.Exceptionpublic void modifyVirtualFolder(VirtualFolderContainer folder) throws java.lang.Exception
modifyVirtualFolder in interface FCServerIfcfolder - Virtual folder that you would like to modifyjava.lang.Exceptionpublic void deleteVirtualFolder(java.lang.String virtualFolderName)
throws java.lang.Exception
deleteVirtualFolder in interface FCServerIfcvirtualFolderName - Name of virtual folder that you would like to deletejava.lang.Exceptionpublic void linkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName,
PermissionsContainer permission)
throws java.lang.Exception
linkUserAndFolder in interface FCServerIfcuserName - Name of user you would like to linkvirtualFolderName - Name of virtual folder that you would like to linkpermission - Permission settings that you would like to use for the linkjava.lang.Exceptionpublic void unlinkUserAndFolder(java.lang.String userName,
java.lang.String virtualFolderName)
throws java.lang.Exception
unlinkUserAndFolder in interface FCServerIfcuserName - Name of user you would like to unlinkvirtualFolderName - Name of virtual folder that you would like to unlinkjava.lang.Exceptionpublic java.util.Collection<FolderUserCanAccess> getFoldersLinkedToUser(java.lang.String userName) throws java.lang.Exception
getFoldersLinkedToUser in interface FCServerIfcuserName - Name of the user that you would like the folders forjava.lang.Exceptionpublic java.util.Collection<ResourceGrantedToFolder> getUsersLinkedToFolder(java.lang.String virtualFolderName) throws java.lang.Exception
getUsersLinkedToFolder in interface FCServerIfcvirtualFolderName - Name of the virtual folder that you would like all the users forjava.lang.Exceptionpublic PermissionsContainer getPermissionsForUserAndFolder(java.lang.String userName, java.lang.String virtualFolderName) throws java.lang.Exception
getPermissionsForUserAndFolder in interface FCServerIfcuserName - User that you would like to get permissions forvirtualFolderName - Virtual Folder that you would like to get permissions forjava.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 - Name of the group that you like the permissions forfoldername - Folder that you would like the permissions forjava.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 - 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 setDeliveryTime(java.lang.String sessionID,
long deliveryTime)
throws InvalidArgumentException,
java.lang.Exception
sessionID - ID of the session that you wish to overridedeliveryTime - long value for expected delivery time.InvalidArgumentException - BandwidthKbps value passed in is incorrect (legal values: >= 0)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 FCServerIfcsessionID - ID of the session that you wish to overridebandwidthKbps - 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 explicitly 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 java.lang.String getRequestString()
getRequestString in interface FCServerIfcpublic 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 licensejava.lang.Exceptionpublic unlimited.fc.com.ConfigSourceIfc<unlimited.fc.server.FileCatalystServerInterface> getConfigSource()
getConfigSource in interface FCServerIfcpublic boolean isStatusClientDisabled()
isStatusClientDisabled in interface FCServerIfcpublic java.util.Collection<unlimited.fc.entity.user.User> getUsers()
throws java.lang.Exception
java.lang.Exception - thrown if you cannot connect to a remote admin.public 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.Exception - thrown if you cannot connect to a remote admin.public int getDefaultIdleTime()
getDefaultIdleTime in interface FCServerIfcpublic void setDefaultIdleTime(int idleTime)
setDefaultIdleTime in interface FCServerIfcidleTime - New default idle time to usepublic 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 createdjava.lang.Exceptionpublic 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 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.ExceptionCopyright © 2015 Unlimi-Tech Sofware Inc. All Rights Reserved.