public class UserContainer
extends java.lang.Object
Title: FileCatalyst Direct Server API
Description: Container class that holds user data. Shell class used when multiple user parameters must be modified at the same time by ServerAPI. Allows manipulation without exposing the inner User classes to the ServerAPI.
Copyright: Copyright (c) 2009
Company: Unlimi-Tech Software Inc.
Modifier and Type | Field and Description |
---|---|
static int |
USERPRIORITY_HIGH
High user priority
|
static int |
USERPRIORITY_LOW
Low user priority.
|
static int |
USERPRIORITY_MEDIUM
Medium user priority (default value)
|
Constructor and Description |
---|
UserContainer(unlimited.fc.entity.user.User existingUser)
Constructor.
|
UserContainer(unlimited.fc.entity.user.UserData existingUser)
Constructor.
|
UserContainer(unlimited.fc.rest.server.model.UserModel existingUser)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
getAccountEnabled()
Returns if the account is currently enabled.
|
java.util.Calendar |
getAccountExpiry()
Returns user's account expiry date if set.
|
int |
getBandwidthLimit()
Returns the bandwidth limit the user has been given on the server (in kbps)
|
java.lang.String |
getEmail()
Returns user's e-mail address
|
boolean |
getFileDeletePermissions()
Returns the user's default permissions on their home directory files
|
boolean |
getFileModifyPermissions()
Returns the user's default permissions on their home directory files
|
boolean |
getFileReadPermissions()
Returns the user's default permissions on their home directory files
|
boolean |
getFileRenamePermissions()
Returns the user's default permissions on their home directory files
|
boolean |
getFileWritePermissions()
Returns the user's default permissions on their home directory files
|
boolean |
getFolderDeletePermissions()
Returns the user's default permissions on their home directory.
|
boolean |
getFolderModifyPermissions()
Returns the user's default permissions on their home directory.
|
boolean |
getFolderReadPermissions()
Returns the user's default permissions on their home directory.
|
boolean |
getFolderRenamePermissions()
Returns the user's default permissions on their home directory.
|
boolean |
getFolderWritePermissions()
Returns the user's default permissions on their home directory.
|
java.lang.String |
getForceOwnershipGroupname()
Returns the value used for the group name during force ownership
|
java.lang.String |
getForceOwnershipUsername()
Returns that value used for the username force ownership.
|
java.lang.String |
getFullName()
Gets user's real full name
|
boolean |
getHasBandwidthLimit()
Returns if a bandwidth limit is activated for the user
|
boolean |
getHasQuotaLimit()
Returns if a quota limit is activated for the user
|
java.lang.String |
getHomeDIR()
Gets user's home directory on the remote server
|
int |
getPermissionAsInt()
Return permissions as integer value.
|
java.lang.String |
getPermissionAsString()
Return permissions as integer value.
|
int |
getPriority()
Returns a priority value for the user on the server.
|
long |
getQuotaPerDay()
Quota allocated to the user on a daily basis (bytes)
|
long |
getQuotaUsed()
Last known quota used
|
java.lang.String |
getUserName()
Gets unique user login name
|
boolean |
isForceFileOwnershipEnabled()
Returns whether or not this user has the force file ownership feature enabled
|
boolean |
isForceOwnershipUseCurrentUsername()
Returns whether or not the user will use it's current username for the force ownership functionality
|
void |
setAccountEnabled(boolean enabled)
Sets the account enabled flag.
|
void |
setAccountExpiry(java.util.Calendar accountExpiry)
Sets the user's account expiry date.
|
void |
setBandwidthLimit(int bandWidthLimit)
Sets the bandwidth limit for the user on the server.
|
void |
setEmail(java.lang.String emailAddress)
Sets the user's e-mail address
|
void |
setFileDeletePermissions(boolean fileDeletePermissions)
Sets the delete permission on the user's files in their home directory
|
void |
setFileModifyPermissions(boolean fileModifyPermissions)
Sets the modify permission on the user's files in their home directory
|
void |
setFileReadPermissions(boolean fileReadPermissions)
Sets the read permission on the user's files in their home directory
|
void |
setFileRenamePermissions(boolean fileRenamePermissions)
Sets the rename permission on the user's files in their home directory
|
void |
setFileWritePermissions(boolean fileWritePermissions)
Sets the write permission on the user's files in their home directory
|
void |
setFolderDeletePermissions(boolean folderDeletePermissions)
Sets the delete permission on the user's folders in their home directory
|
void |
setFolderModifyPermissions(boolean folderModifyPermissions)
Sets the modify permission on the user's folders in their home directory
|
void |
setFolderReadPermissions(boolean folderReadPermissions)
Sets the read permission on the user's folders in their home directory
|
void |
setFolderRenamePermissions(boolean folderRenamePermissions)
Sets the rename permission on the user's folders in their home directory
|
void |
setFolderWritePermissions(boolean folderWritePermissions)
Sets the write permission on the user's folders in their home directory
|
void |
setForceFileOwnershipEnabled(boolean isForceFileOwnershipEnabled)
Sets whether or not this user has the force file ownership feature enabled
|
void |
setForceOwnershipGroupname(java.lang.String forceOwnershipGroupname)
Sets the value used for the group name during force ownership
|
void |
setForceOwnershipUseCurrentUsername(boolean forceOwnershipUseCurrentUsername)
Sets whether or not the user will use it's current username for the force ownership functionality
|
void |
setForceOwnershipUsername(java.lang.String forceOwnershipUsername)
Sets the value used for the username force ownership.
|
void |
setFullName(java.lang.String fullName)
Sets the user's real full name
|
void |
setHasBandwidthLimit(boolean imposeBandwidthLimit)
Sets the flag if bandwidth restrictions are imposed on the user.
|
void |
setHasQuotaLimit(boolean imposeQuotaLimit)
Sets if quota limits are activated for this user
|
void |
setHomeDIR(java.lang.String homeDirectory)
Sets user's home directory on the remote server
|
void |
setPriority(int priority)
Sets the priority value for the user.
|
void |
setQuotaPerDay(long quotaPerDay)
Sets the daily quota limit allocated for this user (in bytes)
|
java.lang.String |
toCLIOutput() |
java.lang.String |
toString() |
public static final int USERPRIORITY_LOW
public static final int USERPRIORITY_MEDIUM
public static final int USERPRIORITY_HIGH
public UserContainer(unlimited.fc.entity.user.User existingUser) throws InvalidArgumentException
data.username
- String unique usernameInvalidArgumentException
- exception thrown if user cannot be foundpublic UserContainer(unlimited.fc.entity.user.UserData existingUser) throws InvalidArgumentException
data.username
- String unique usernameInvalidArgumentException
- exception thrown if user cannot be foundpublic UserContainer(unlimited.fc.rest.server.model.UserModel existingUser) throws InvalidArgumentException
data.username
- String unique usernameInvalidArgumentException
- exception thrown if user cannot be foundpublic java.lang.String getUserName()
public java.lang.String getFullName()
public void setFullName(java.lang.String fullName)
fullName
- Stringpublic java.lang.String getHomeDIR()
public void setHomeDIR(java.lang.String homeDirectory)
homeDirectory
- String Home directory path on server file systempublic java.lang.String getEmail()
public void setEmail(java.lang.String emailAddress)
emailAddress
- String Email addresspublic java.util.Calendar getAccountExpiry()
public void setAccountExpiry(java.util.Calendar accountExpiry)
accountExpiry
- Calendar Date when account automatically expires. Set to null for no expiry.public boolean getAccountEnabled()
public void setAccountEnabled(boolean enabled)
enabled
- boolean set to true to enable the account, false to disable it.public int getPermissionAsInt()
public java.lang.String getPermissionAsString()
public boolean getFileReadPermissions()
public void setFileReadPermissions(boolean fileReadPermissions)
fileReadPermissions
- booleanpublic boolean getFileWritePermissions()
public void setFileWritePermissions(boolean fileWritePermissions)
fileWritePermissions
- booleanpublic boolean getFileModifyPermissions()
public void setFileModifyPermissions(boolean fileModifyPermissions)
fileModifyPermissions
- booleanpublic boolean getFileDeletePermissions()
public void setFileDeletePermissions(boolean fileDeletePermissions)
fileDeletePermissions
- booleanpublic boolean getFileRenamePermissions()
public void setFileRenamePermissions(boolean fileRenamePermissions)
fileRenamePermissions
- booleanpublic boolean getFolderReadPermissions()
public void setFolderReadPermissions(boolean folderReadPermissions)
folderReadPermissions
- booleanpublic boolean getFolderWritePermissions()
public void setFolderWritePermissions(boolean folderWritePermissions)
folderWritePermissions
- booleanpublic boolean getFolderModifyPermissions()
public void setFolderModifyPermissions(boolean folderModifyPermissions)
folderModifyPermissions
- booleanpublic boolean getFolderDeletePermissions()
public void setFolderDeletePermissions(boolean folderDeletePermissions)
folderDeletePermissions
- booleanpublic boolean getFolderRenamePermissions()
public void setFolderRenamePermissions(boolean folderRenamePermissions)
folderRenamePermissions
- booleanpublic int getPriority()
public void setPriority(int priority) throws InvalidArgumentException
priority
- int value between 1 (low) to 10 (high)InvalidArgumentException
- Value given is not 1 through 10public int getBandwidthLimit()
public void setBandwidthLimit(int bandWidthLimit) throws InvalidArgumentException
bandWidthLimit
- long bandwidth value in kbpsInvalidArgumentException
- bandwidth value is invalidpublic boolean getHasBandwidthLimit()
public void setHasBandwidthLimit(boolean imposeBandwidthLimit)
imposeBandwidthLimit
- booleanpublic boolean getHasQuotaLimit()
public void setHasQuotaLimit(boolean imposeQuotaLimit)
imposeQuotaLimit
- booleanpublic long getQuotaPerDay()
public void setQuotaPerDay(long quotaPerDay) throws InvalidArgumentException
quotaPerDay
- long daily quota limit in bytes.InvalidArgumentException
- if the quota per day is an invalid numberpublic long getQuotaUsed()
public boolean isForceFileOwnershipEnabled()
public void setForceFileOwnershipEnabled(boolean isForceFileOwnershipEnabled)
isForceFileOwnershipEnabled
- the isForceFileOwnershipEnabled to setpublic boolean isForceOwnershipUseCurrentUsername()
public void setForceOwnershipUseCurrentUsername(boolean forceOwnershipUseCurrentUsername)
forceOwnershipUseCurrentUsername
- the forceOwnershipUseCurrentUsername to setpublic java.lang.String getForceOwnershipUsername()
public void setForceOwnershipUsername(java.lang.String forceOwnershipUsername)
forceOwnershipUsername
- the forceOwnershipUsername to setpublic java.lang.String getForceOwnershipGroupname()
public void setForceOwnershipGroupname(java.lang.String forceOwnershipGroupname)
forceOwnershipGroupname
- the forceOwnershipGroupname to setpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCLIOutput()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2015 Unlimi-Tech Sofware Inc. All Rights Reserved.