Class AdminConnector
java.lang.Object
com.elpical.jclaro.admin.ws.server.AdminConnector
@MTOM
@BindingType("http://www.w3.org/2003/05/soap/bindings/HTTP/")
public class AdminConnector
extends Object
Entrance point for Claro Administration WebServices
- See Also:
- Description with example
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTask(byte[] userToken)
Creates a new default Taskjavax.activation.DataHandler
backupDatabase(byte[] userToken)
void
changeChannelStati(byte[] userToken, String channelNrAndActive, String userName)
Change the status of channel: channelNr.void
changeChannelStatus(byte[] userToken, int channelNr, boolean active, String userName)
Change the status of channel: channelNr.void
changeGroup(byte[] userToken, Group group, List<Integer> channelNrs)
Changes which channels belong to the Group.void
changeGroupName(byte[] userToken, String oldname, String newname)
void
changeGroupStatus(byte[] userToken, int[] channelNrs, boolean active)
Change the status of a list of channels in a Group.void
changePassword(byte[] userToken, byte[] encryptedOldPassword, byte[] encryptedNewPassword)
Change the password for the user corresponding with the supplied unique login-token.void
changeTaskStatus(byte[] userToken, int taskId, boolean b)
Change the status of the specified Taskvoid
changeTaskStatusDB(byte[] userToken, String taskIdAndActive)
Database version Change the status of the specified TaskcheckChannel(AdminChannel adminChannel)
void
clearErrorLog(byte[] userToken)
Updates the timestamp which determines after which time the Error log should be shownvoid
clearLog(byte[] userToken)
Updates the timestamp which determines after which time thelog should be shownvoid
copyChannel(byte[] userToken, int channr)
Copies the Channel with the specified id.void
createFolder(byte[] userToken, String folderName)
Create the specified folder on the servercreateGroup(byte[] userToken, String name)
Creates a new GroupcreateNewChannel(byte[] userToken, AdminChannel ac)
Create a new AdminChannel with settings taken from the supplied AdminChannel ONLY TO BE USED WITH THE CLARO DATABASE VERSIONcreateNewCroppingChannel(byte[] userToken)
Create a new CroppingChannel with default settingscreateNewDeviceLinkChannel(byte[] userToken)
Create a new DeviceLinkChannel with default settingscreateNewProcessingChannel(byte[] userToken)
Create a new ProcessingChannel with default settingscreateNewPurgingChannel(byte[] userToken)
Create a new PurgingChannel with default settingscreateNewRoutingChannel(byte[] userToken)
Create a new RoutingChannel with default settingsvoid
Deactivates the current Claro License.void
deleteICCProfile(byte[] userToken, String iccProfileName)
Deletes an ICC profile from the Claro profiles folderjavax.activation.DataHandler
Download the ClaroAdmin installer for the requested Operating systembyte[]
exportChannel(byte[] userToken, String channelname)
Exports the specified Channel to a byte[] as XMLjavax.activation.DataHandler
exportDiagnosticsPackage(byte[] userToken)
Export the diagnostics package as an application/octet-stream.byte[]
exportGroup(byte[] userToken, String groupName)
Export the configuration of a whole Group as XML to a byte[]void
exportStatistics(byte[] userToken, int fromYear, int fromMonth, int fromDay, int toYear, int toMonth, int toDay)
Method to export statistics from the database to xml file(s) in the log folder (claro/log OR cluster/log)getAbsoluteClaroServerPath(byte[] userToken, String path)
Returns the absolute path for a given path on the Claro ServergetAccounts(byte[] userToken)
Returns a list of Accounts registered in Claro.Returns the available charactersets installed on the servergetCERTAlias(byte[] userToken)
getChannel(byte[] userToken, int channelNumber)
Get a single channel with the given channel number.getChannelByName(byte[] userToken, String name)
Get a single channel with the given channel name.getChannels(byte[] userToken)
Gets a list of all ChannelsgetClaroBackupServers(byte[] userToken)
JFR 21-okt-2015: Ticket 1154: Added this method, so that clients can get a list of backup Claro servers.getClaroServers(byte[] userToken)
returns number of available Claro servers in multiserver operation returns null if multiserver operation has not been configured For internal usage only!getEmailServer(byte[] userToken)
Gets information about the configured Email server in ClarogetErrorLog(byte[] userToken)
Returns a list of Error LogMessagesgetFilesInFolder(byte[] userToken, String foldername)
Lists the files in the specified foldergetGoogleVisionAPIKey(byte[] userToken)
Returns the Google API key used for the Vision AI APIReturns list of GroupsReturns the hostname of the server.getHTTPSKeystorePassword(byte[] userToken)
getHTTPSKeystorePath(byte[] userToken)
getInspectorItems(byte[] userToken, List<Integer> channelIds)
List of Inspector Job's availablejavax.activation.DataHandler
getInspectorPreview(byte[] userToken, int inspectorID)
Gets a (jpeg) preview for the specified Inspector jobgetJobredirectorFolder(byte[] userToken)
Returns the folder used for Job redirectsint
getJobsInQueue(byte[] userToken, String channelname)
Returns the number of Inspector jobs for the specified channel.int
The state of the license Unknown(0): Not yet checked Valid(1): The key can be read and is successfully validated ValidButExpiredSubscription(2): Subscription period expired within the grace period Missing(3): The key can not be read, because it is not in present in the license folder ExpiredSubscription(4): Subscription period and grace period are expired ExpiredEvaluation(5): Evaluation period expired Corrupt(6): The key can be read, but information inside can not be decoded correctly InvalidProduct(7): The key can be read, but is not licensed for this product InvalidSystem(8): The key can be read, but information inside the license does not match the system InvalidVersion(9): The key can be read, but is not valid for this product version InvalidUninstalled(10): The key is uninstalled before and can not be used anymoregetLog(byte[] userToken)
Returns a list of LogMessagesReturns the name of the installed productReturns the folder in Claro where the Claro ICC profiles are stored.Returns a list of ICC profiles available to the Operating System of the serverbyte[]
Returns the public key from the server available for client to server encryptiongetRemoteFileList(byte[] userToken, String folderName, boolean showParent, boolean showFiles)
getRemoveBGAPIKey(byte[] userToken)
Returns the RemoveBG API key used for the RemoveBG APIString[]
Returns a list of String which are available as types for scheduling tasksgetServerList(byte[] userToken)
Returns system information of the systemgetTasks(byte[] userToken)
Gets a list of TasksReturns the version number of ClarogoogleVision(byte[] userToken, javax.activation.DataHandler imgdata, boolean useBeta)
Returns Google Vision result for the supplied imagevoid
importChannel(byte[] userToken, String filename, byte[] bytes)
Imports a Channel from the supplied Prefences-XML (bytes[])void
installLicense(byte[] licbytes)
Installs the Claro Licenseboolean
isAlive()
Method to check the availability of this Claro server.static boolean
boolean
Returns whether CCI support is activated in the license.boolean
isChannelActive(byte[] userToken, int channelNumber)
Check whether the channel with the given number is currently active (true) or stand-by (false).boolean
Returns whether CropWithBox option is activated in the license.boolean
isCustomerInLicense(String str)
Returns whether special customer license is available.boolean
boolean
Returns whether DPISharpening option is activated in the license.boolean
Returns whether FunkInform support is activated in the license.boolean
Returns whether RemoveBG support is activated in the license.Logs the user in with the supplied name.Returns information about the license Claro is currently using.removeAccounts(byte[] userToken, List<Account> accounts)
Removes the specified list of Accountsvoid
removeChannels(byte[] userToken, List<Integer> chanNrs)
void
removeGroups(byte[] userToken, List<String> names)
Removes the specified Groups from the system.void
removeTasks(byte[] userToken, List<Integer> ids)
Removes the specified tasksvoid
resetPassword(String s)
Resets the password for the specified user.void
resetStatistics(byte[] userToken)
Returns hardware information about the Claro serversaveAccounts(byte[] userToken, List<Account> accounts)
Saves the supplied Accounts.void
saveChannel(byte[] userToken, AdminChannel channel)
Saves the Channelvoid
saveEmailServer(byte[] userToken, EmailServer server)
Sets the Email server to be used in Clarovoid
Saves the TaskssendHeartbeat(String senderIPV4, String senderHostname)
void
setCERTAlias(byte[] userToken, String alias)
void
setGoogleVisionAPIKey(byte[] userToken, String key)
Sets the Google API key used for the Vision AI APIvoid
setHTTPSKeystorePassword(byte[] userToken, String keystorePassword)
void
setHTTPSKeystorePath(byte[] userToken, String keystorePath)
void
setJobRedirectorFolder(byte[] userToken, String folder)
Sets the folder used for Job redirectsvoid
setRemoveBGAPIKey(byte[] userToken, String key)
Sets the RemoveBG API key used for the RemoveBG APIvoid
setServerList(byte[] userToken, String serverList)
boolean
testSMTPConnection(byte[] userToken, String smtpServerString, String smtpUserString, String smtpPasswordString, String fromAddressString, String toAddressString, boolean useSSL, int sslPort, String subjectText, String messageText)
Method to test the email SMTP connection settingsbyte[]
uploadFileToChannel(byte[] userToken, javax.activation.DataHandler imgdata, String userName, String fileName, int channelNr)
Uploads file to channel and returns preview of uploaded imagevoid
uploadICCProfile(byte[] userToken, String iccProfileName, javax.activation.DataHandler profiledata, boolean overwrite)
Uploads a new ICC profile to the profiles folder of Clarovoid
useInspectedNone(byte[] userToken, int id, String username)
Instructs the Claro server to use neither the processed or original file for the specified Inspector jobvoid
useInspectedOriginal(byte[] userToken, int id, String username)
Instructs the Claro server to use the original file for the specified Inspector jobvoid
useInspectedProcessed(byte[] userToken, int id, String username)
Instructs the Claro server to use the processed file for the specified Inspector job
-
Field Details
-
MAX_PROFILES
final int MAX_PROFILES- See Also:
- Constant Field Values
-
-
Constructor Details
-
AdminConnector
public AdminConnector()
-
-
Method Details
-
isCaaSVersion
public static boolean isCaaSVersion() -
resetPassword
Resets the password for the specified user. The user needs to have an email address configured because the new password will be mailed to the user. If the user has no email address to password will not be changed.- Parameters:
s
- The user to change the password of.
-
changePassword
public void changePassword(byte[] userToken, byte[] encryptedOldPassword, byte[] encryptedNewPassword) throws ExceptionChange the password for the user corresponding with the supplied unique login-token. The old and new password are asymetric encrypted as described in the example.- Parameters:
userToken
- The unique login-token of the user to change the password of.encryptedOldPassword
- Encrypted old password. See the example.encryptedNewPassword
- Encrypted new password. See the example.- Throws:
LoginException
- LoginException is thrown if no user is logged in with this login-token or the session has expired. ExceptionException
- See Also:
- Description with example
-
login
Logs the user in with the supplied name. Returns an Account object containing the unique login-token needed in most methods to be able to check the login of the user. The login-token stays valid for 20 minutes after it's last use.- Parameters:
name
- The name of the userencryptedPassword
- The encrypted password of the user (See example)publicKey
- (deprecated) - The public key of this user, used to encrypt sensitive information send from the server to the client (see example)- See Also:
- Description with example
-
getAccounts
Returns a list of Accounts registered in Claro.- Parameters:
userToken
- The unique login-token of a user with privileges to view Account information- Returns:
- List of Accounts registered in Claro.
- Throws:
LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).PrivilegeException
- User has no privileges to see Account information.- See Also:
Account.getAccountPrivileges()
-
saveAccounts
public List<Account> saveAccounts(byte[] userToken, List<Account> accounts) throws PrivilegeException, LoginExceptionSaves the supplied Accounts. The passwords specified for the Accounts are expected to be encrypted (see example code)- Parameters:
userToken
- The unique login-token of a user with privileges to edit Account informationaccounts
- List of Accounts- Returns:
- List of saved Accounts
- Throws:
PrivilegeException
- User has no privileges to edit Account information.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
- Description with example,
Account.getAccountPrivileges()
-
removeAccounts
public List<Account> removeAccounts(byte[] userToken, List<Account> accounts) throws PrivilegeException, LoginExceptionRemoves the specified list of Accounts- Parameters:
userToken
- The unique login-token of a user with privileges to edit Account informationaccounts
- List of Accounts to remove- Returns:
- Actual list of Account after removal of the specified Accounts
- Throws:
PrivilegeException
- User has no privileges to edit Account information.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getAccountPrivileges()
-
getVersion
Returns the version number of Claro- Returns:
- The version number of Claro
-
downloadLatestVersion
Download the ClaroAdmin installer for the requested Operating system- Parameters:
os
- The operating system where the installer is for mac,windows or linux. If no operating or an incorrect Operating System is specified the method will try to guess for which operating system the installer is needed for.- Returns:
- application/octet-stream to ClaroAdmin installer
- Throws:
Exception
- If requested installer is not available.
-
isAlive
public boolean isAlive()Method to check the availability of this Claro server.- Returns:
- true
-
getProductName
Returns the name of the installed product- Returns:
- The name of the installed product
-
createNewProcessingChannel
public ProcessingChannel createNewProcessingChannel(byte[] userToken) throws PrivilegeException, LoginExceptionCreate a new ProcessingChannel with default settings- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information- Returns:
- A new ProcessingChannel with default settings
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createNewRoutingChannel
public RoutingChannel createNewRoutingChannel(byte[] userToken) throws PrivilegeException, LoginExceptionCreate a new RoutingChannel with default settings- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information- Returns:
- A new RoutingChannel with default settings
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createNewDeviceLinkChannel
public DeviceLinkChannel createNewDeviceLinkChannel(byte[] userToken) throws PrivilegeException, LoginExceptionCreate a new DeviceLinkChannel with default settings- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information- Returns:
- A new DeviceLinkChannel with default settings
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createNewPurgingChannel
public PurgingChannel createNewPurgingChannel(byte[] userToken) throws PrivilegeException, LoginExceptionCreate a new PurgingChannel with default settings- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information- Returns:
- A new PurgingChannel with default settings
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createNewChannel
public AdminChannel createNewChannel(byte[] userToken, AdminChannel ac) throws PrivilegeException, LoginExceptionCreate a new AdminChannel with settings taken from the supplied AdminChannel ONLY TO BE USED WITH THE CLARO DATABASE VERSION- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationac
- The AdminChannel to use the settings of to create a new AdminChannel- Returns:
- A new AdminChannel with settings taken from the supplied AdminChannel
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createNewCroppingChannel
public CroppingChannel createNewCroppingChannel(byte[] userToken) throws PrivilegeException, LoginExceptionCreate a new CroppingChannel with default settings- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information- Returns:
- A new CroppingChannel with default settings
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
isChannelActive
public boolean isChannelActive(byte[] userToken, int channelNumber) throws PrivilegeException, LoginExceptionCheck whether the channel with the given number is currently active (true) or stand-by (false). It will also return false if the channel was not found.- Parameters:
userToken
-channelNumber
-- Returns:
- active (true) or stand-by (false).
- Throws:
PrivilegeException
LoginException
-
changeChannelStatus
public void changeChannelStatus(byte[] userToken, int channelNr, boolean active, String userName) throws PrivilegeException, LoginExceptionChange the status of channel: channelNr. The username is used to log information about who changed the status- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationchannelNr
- The number of the channel to change the status ofactive
- Set the channel to active or in-active (standby)userName
- Username is used to log information about who changed the status- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
changeChannelStati
public void changeChannelStati(byte[] userToken, String channelNrAndActive, String userName) throws PrivilegeException, LoginExceptionChange the status of channel: channelNr. The username is used to log information about who changed the status- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationchannelNrAndActive
- CommaSeparated String with repeating pairs of The number of the channel to change the status of Set the channel to active or in-active (standby)userName
- Username is used to log information about who changed the status- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
changeGroupStatus
public void changeGroupStatus(byte[] userToken, int[] channelNrs, boolean active) throws PrivilegeException, LoginExceptionChange the status of a list of channels in a Group. The username is used to log information about who changed the status- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationchannelNrs
- List of id's of the Channels to change status of.active
- Set the channels to active or in-active (standby)- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
removeChannels
public void removeChannels(byte[] userToken, List<Integer> chanNrs) throws PrivilegeException, LoginException- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationchanNrs
- The id's of the Channels to remove- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
createGroup
Creates a new Group- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationname
- The name of the new Group- Returns:
- The new created Group
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
changeGroupName
public void changeGroupName(byte[] userToken, String oldname, String newname) throws PrivilegeException, LoginException- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration informationoldname
- Old name of Groupnewname
- New name of Group- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
changeGroup
public void changeGroup(byte[] userToken, Group group, List<Integer> channelNrs) throws PrivilegeException, LoginExceptionChanges which channels belong to the Group.- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.group
- The group where the channels will belong to.channelNrs
- List of Channel id's which will be long tho this Group- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
removeGroups
public void removeGroups(byte[] userToken, List<String> names) throws PrivilegeException, LoginExceptionRemoves the specified Groups from the system. Channels which belong to these Groups are made part of the default Group.- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.names
- List of Group names to remove- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
copyChannel
Copies the Channel with the specified id. The new Channel will have the same input and output and because of that it is set to "Standby" status.- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.channr
- The id of the Channel to copy- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
importChannel
public void importChannel(byte[] userToken, String filename, byte[] bytes) throws PrivilegeException, LoginException, IOExceptionImports a Channel from the supplied Prefences-XML (bytes[])- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.filename
- The name of the file which is importedbytes
- The contents of the XML-file to import- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).IOException
- When an IO Exception occurs- See Also:
Account.getConfigurationPrivileges()
-
exportChannel
public byte[] exportChannel(byte[] userToken, String channelname) throws PrivilegeException, LoginException, IOExceptionExports the specified Channel to a byte[] as XML- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.channelname
- The name of the Channel to export- Returns:
- byte[] containing the XML preferences of the Channel
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).IOException
- When an IO Exception occurs- See Also:
Account.getConfigurationPrivileges()
-
exportGroup
public byte[] exportGroup(byte[] userToken, String groupName) throws PrivilegeException, LoginException, IOExceptionExport the configuration of a whole Group as XML to a byte[]- Parameters:
userToken
- The unique login-token of a user with privileges to edit Configuration information.groupName
- The name of the Group to export.- Returns:
- byte[] Containing the XML preferences of the Channels in the Group.
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).IOException
- When an IO Exception occurs- See Also:
Account.getConfigurationPrivileges()
-
getChannel
public AdminChannel getChannel(byte[] userToken, int channelNumber) throws PrivilegeException, LoginExceptionGet a single channel with the given channel number.- Parameters:
userToken
-channelNumber
-- Returns:
- Throws:
PrivilegeException
LoginException
-
getChannelByName
public AdminChannel getChannelByName(byte[] userToken, String name) throws PrivilegeException, LoginExceptionGet a single channel with the given channel name.- Parameters:
userToken
-name
-- Returns:
- Throws:
PrivilegeException
LoginException
-
getChannels
Gets a list of all Channels- Parameters:
userToken
- The unique login-token of a user with privileges to View Configuration information.- Returns:
- List of all Channels
- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
checkChannel
-
getGroups
Returns list of Groups- Returns:
- List of Groups
-
getFilesInFolder
public List<String> getFilesInFolder(byte[] userToken, String foldername) throws PrivilegeException, LoginExceptionLists the files in the specified folder- Parameters:
userToken
- The unique login-token of a user with privileges to View Configuration information.foldername
- The name of the folder to list the contents of- Returns:
- List of files in the specified folder.
- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getJobsInQueue
public int getJobsInQueue(byte[] userToken, String channelname) throws PrivilegeException, LoginExceptionReturns the number of Inspector jobs for the specified channel.- Parameters:
userToken
- The unique login-token of a user with privileges to View Configuration information.channelname
- The name of the Channel for which to get the number of Inspector jobs of- Returns:
- The number of Inspector jobs in a Channel
- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getAvailableCharacterSets
Returns the available charactersets installed on the server- Returns:
- The available charactersets installed on the server
-
createFolder
public void createFolder(byte[] userToken, String folderName) throws PrivilegeException, LoginExceptionCreate the specified folder on the server- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.folderName
- The folder to create- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getProfilesFolderSystem
Returns a list of ICC profiles available to the Operating System of the server- Returns:
- List of ICC profiles available to the Operating System of the server
-
getProfilesFolderClaro
Returns the folder in Claro where the Claro ICC profiles are stored.- Returns:
- The folder in Claro where the Claro ICC profiles are stored.
-
getRemoteFileList
public List<RemoteFile> getRemoteFileList(byte[] userToken, String folderName, boolean showParent, boolean showFiles) throws PrivilegeException, LoginException- Parameters:
userToken
- The unique login-token of a user with privileges to View Configuration information.folderName
- The folder to list the contents ofshowParent
- Includes information about the folders parentsshowFiles
- Whether to show files or only folder-names- Returns:
- List of files or folders in the specified folder
- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getLog
Returns a list of LogMessages- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.- Returns:
- List of LogMessages
- Throws:
PrivilegeException
- User has no View privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
getErrorLog
Returns a list of Error LogMessages- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.- Returns:
- List of Error LogMessages
- Throws:
PrivilegeException
- User has no View privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
clearErrorLog
Updates the timestamp which determines after which time the Error log should be shown- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
clearLog
Updates the timestamp which determines after which time thelog should be shown- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
saveChannel
public void saveChannel(byte[] userToken, AdminChannel channel) throws PrivilegeException, LoginExceptionSaves the Channel- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.channel
- The channel to save- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getSystemInfo
Returns system information of the system- Returns:
- System information of the system
-
installLicense
Installs the Claro License- Parameters:
licbytes
- The Claro License- Throws:
Exception
-
readLicense
Returns information about the license Claro is currently using.- Returns:
- Information about the license Claro is currently using
- Throws:
Exception
-
getLicenseState
public int getLicenseState()The state of the license Unknown(0): Not yet checked Valid(1): The key can be read and is successfully validated ValidButExpiredSubscription(2): Subscription period expired within the grace period Missing(3): The key can not be read, because it is not in present in the license folder ExpiredSubscription(4): Subscription period and grace period are expired ExpiredEvaluation(5): Evaluation period expired Corrupt(6): The key can be read, but information inside can not be decoded correctly InvalidProduct(7): The key can be read, but is not licensed for this product InvalidSystem(8): The key can be read, but information inside the license does not match the system InvalidVersion(9): The key can be read, but is not valid for this product version InvalidUninstalled(10): The key is uninstalled before and can not be used anymore- Returns:
- State of the Claro license
-
deactivateLicense
Deactivates the current Claro License. The license can not be used anymore before Elpical released the license in the LicenseServer. This is a manual intervention to prevent abuse. To prevent down-time please first consult with Elpical.- Throws:
Exception
-
getScheduleTypes
Returns a list of String which are available as types for scheduling tasks -
removeTasks
public void removeTasks(byte[] userToken, List<Integer> ids) throws PrivilegeException, LoginExceptionRemoves the specified tasks- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Task information.ids
- List of id's of Tasks to remove- Throws:
PrivilegeException
- User has no Edit privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
changeTaskStatus
public void changeTaskStatus(byte[] userToken, int taskId, boolean b) throws PrivilegeException, LoginExceptionChange the status of the specified Task- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Task information.taskId
- The id to change the status ofb
- Whether to set the Task to active or in-active- Throws:
PrivilegeException
- User has no Edit privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
changeTaskStatusDB
public void changeTaskStatusDB(byte[] userToken, String taskIdAndActive) throws PrivilegeException, LoginExceptionDatabase version Change the status of the specified Task- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Task information.taskIdAndActive
- Comma-separated pairs of the id to change the status of and active (0) or in-active (1)- Throws:
PrivilegeException
- User has no Edit privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
addTask
Creates a new default Task- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Task information.- Returns:
- A new default Task
- Throws:
PrivilegeException
- User has no Edit privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
saveTasks
public void saveTasks(byte[] userToken, List<Task> tasks) throws PrivilegeException, LoginExceptionSaves the Tasks- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Task information.tasks
- List of Tasks to save- Throws:
PrivilegeException
- User has no Edit privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
getTasks
Gets a list of Tasks- Parameters:
userToken
- The unique login-token of a user with privileges to VIEW Task information.- Returns:
- List of Tasks
- Throws:
PrivilegeException
- User has no View privileges for the Tasks.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getTaskPrivileges()
-
backupDatabase
public javax.activation.DataHandler backupDatabase(byte[] userToken) throws PrivilegeException, LoginException, IOException -
exportStatistics
public void exportStatistics(byte[] userToken, int fromYear, int fromMonth, int fromDay, int toYear, int toMonth, int toDay) throws ExceptionMethod to export statistics from the database to xml file(s) in the log folder (claro/log OR cluster/log)- Throws:
Exception
-
resetStatistics
- Throws:
Exception
-
isCCISupportAktive
public boolean isCCISupportAktive()Returns whether CCI support is activated in the license.- Returns:
- Is CCI support activated in the license.
-
isRemoveBGSupportAktive
public boolean isRemoveBGSupportAktive()Returns whether RemoveBG support is activated in the license.- Returns:
- Is RemoveBG support activated in the license.
-
isFunkInformSupportAktive
public boolean isFunkInformSupportAktive()Returns whether FunkInform support is activated in the license.- Returns:
- Is FunkInform support activated in the license.
-
isDPISharpeningAktive
public boolean isDPISharpeningAktive()Returns whether DPISharpening option is activated in the license.- Returns:
- Is DPISharpening option is activated in the license.
-
isCropWithBoxAktive
public boolean isCropWithBoxAktive()Returns whether CropWithBox option is activated in the license.- Returns:
- Is CropWithBox option activated in the license.
-
isCustomerInLicense
Returns whether special customer license is available.- Parameters:
str
- The customer option to check for- Returns:
- Returns whether special customer license is available.
-
getHostName
Returns the hostname of the server.- Returns:
- The hostname of the server
- Throws:
Exception
-
exportDiagnosticsPackage
public javax.activation.DataHandler exportDiagnosticsPackage(byte[] userToken) throws PrivilegeException, LoginException, IOExceptionExport the diagnostics package as an application/octet-stream. This diagnostics package is a zipped stream containing configuration and log files necessary for support.- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.- Returns:
- The diagnostics package
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).IOException
- See Also:
Account.getConfigurationPrivileges()
-
getJobredirectorFolder
Returns the folder used for Job redirects- Parameters:
userToken
- The unique login-token of a user with privileges to View Configuration information.- Returns:
- The folder used for Job redirects
- Throws:
PrivilegeException
- User has no View privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
setJobRedirectorFolder
public void setJobRedirectorFolder(byte[] userToken, String folder) throws PrivilegeException, LoginExceptionSets the folder used for Job redirects- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.folder
- The folder to be used for Job redirects- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getGoogleVisionAPIKey
Returns the Google API key used for the Vision AI API- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.- Returns:
- The Google API key used for the Vision AI API
- Throws:
PrivilegeException
- User has no View privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
getRemoveBGAPIKey
Returns the RemoveBG API key used for the RemoveBG API- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.- Returns:
- The RemoveBG API key used for the RemoveBG API
- Throws:
PrivilegeException
- User has no View privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
setGoogleVisionAPIKey
public void setGoogleVisionAPIKey(byte[] userToken, String key) throws PrivilegeException, LoginExceptionSets the Google API key used for the Vision AI API- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.key
- The Google API key used for the Vision AI API- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
setRemoveBGAPIKey
public void setRemoveBGAPIKey(byte[] userToken, String key) throws PrivilegeException, LoginExceptionSets the RemoveBG API key used for the RemoveBG API- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.key
- The RemoveBG API key used for the RemoveBG API- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
getHTTPSKeystorePath
- Throws:
PrivilegeException
LoginException
-
setHTTPSKeystorePath
public void setHTTPSKeystorePath(byte[] userToken, String keystorePath) throws PrivilegeException, LoginException- Throws:
PrivilegeException
LoginException
-
getHTTPSKeystorePassword
- Throws:
PrivilegeException
LoginException
-
setHTTPSKeystorePassword
public void setHTTPSKeystorePassword(byte[] userToken, String keystorePassword) throws PrivilegeException, LoginException- Throws:
PrivilegeException
LoginException
-
getCERTAlias
- Throws:
PrivilegeException
LoginException
-
setCERTAlias
- Throws:
PrivilegeException
LoginException
-
getEmailServer
Gets information about the configured Email server in Claro- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.- Returns:
- Information about the configured Email server in Claro
- Throws:
PrivilegeException
- User has no View privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
saveEmailServer
public void saveEmailServer(byte[] userToken, EmailServer server) throws PrivilegeException, LoginExceptionSets the Email server to be used in Claro- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.server
- The Email server to be used in Claro- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getMaintenancePrivileges()
-
getPublicKey
public byte[] getPublicKey()Returns the public key from the server available for client to server encryption- Returns:
- The public key from the server available for client to server encryption
- See Also:
- Description with example
-
getInspectorItems
public List<InspectorItem> getInspectorItems(byte[] userToken, List<Integer> channelIds) throws PrivilegeException, LoginExceptionList of Inspector Job's available- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.channelIds
- List of id's of channels of which to return the available Inspector jobs of- Returns:
- List of Inspector Job's available
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
getInspectorPreview
public javax.activation.DataHandler getInspectorPreview(byte[] userToken, int inspectorID) throws PrivilegeException, LoginExceptionGets a (jpeg) preview for the specified Inspector job- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.inspectorID
- the id of the Inspector job to get a preview for- Returns:
- A (jpeg) preview for the specified Inspector job
- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).- See Also:
Account.getConfigurationPrivileges()
-
useInspectedProcessed
public void useInspectedProcessed(byte[] userToken, int id, String username) throws PrivilegeException, LoginException, javax.xml.ws.WebServiceExceptionInstructs the Claro server to use the processed file for the specified Inspector job- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.id
- the Inspector job id.username
- The name of the user. Will be printed in the log- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).javax.xml.ws.WebServiceException
- See Also:
Account.getConfigurationPrivileges()
-
useInspectedOriginal
public void useInspectedOriginal(byte[] userToken, int id, String username) throws PrivilegeException, LoginException, javax.xml.ws.WebServiceExceptionInstructs the Claro server to use the original file for the specified Inspector job- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.id
- the Inspector job id.username
- The name of the user. Will be printed in the log- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).javax.xml.ws.WebServiceException
- See Also:
Account.getConfigurationPrivileges()
-
useInspectedNone
public void useInspectedNone(byte[] userToken, int id, String username) throws PrivilegeException, LoginException, javax.xml.ws.WebServiceExceptionInstructs the Claro server to use neither the processed or original file for the specified Inspector job- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Configuration information.id
- the Inspector job id.username
- The name of the user. Will be printed in the log- Throws:
PrivilegeException
- User has no Edit privileges for the Configuration.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).javax.xml.ws.WebServiceException
- See Also:
Account.getConfigurationPrivileges()
-
sendHeartbeat
public String sendHeartbeat(String senderIPV4, String senderHostname) throws javax.xml.ws.WebServiceException- Throws:
javax.xml.ws.WebServiceException
-
retrieveHWInfo
Returns hardware information about the Claro server- Returns:
- Hardware information about the Claro server
- Throws:
javax.xml.ws.WebServiceException
-
googleVision
public GoogleVisionResult googleVision(byte[] userToken, javax.activation.DataHandler imgdata, boolean useBeta) throws ExceptionReturns Google Vision result for the supplied image- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.imgdata
- The image datauseBeta
- Whether to use Google Vision beta features- Returns:
- The GoogleVision result
- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).Exception
- See Also:
Account.getConfigurationPrivileges()
,GoogleVisionResult
-
uploadICCProfile
public void uploadICCProfile(byte[] userToken, String iccProfileName, javax.activation.DataHandler profiledata, boolean overwrite) throws ExceptionUploads a new ICC profile to the profiles folder of Claro- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.iccProfileName
- The name of the ICC profileprofiledata
- The ICC profile dataoverwrite
- Whether to overwrite an existing file with the same name- Throws:
Exception
-
deleteICCProfile
Deletes an ICC profile from the Claro profiles folder- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.iccProfileName
- The name of the ICC profile- Throws:
Exception
-
testSMTPConnection
public boolean testSMTPConnection(byte[] userToken, String smtpServerString, String smtpUserString, String smtpPasswordString, String fromAddressString, String toAddressString, boolean useSSL, int sslPort, String subjectText, String messageText) throws ExceptionMethod to test the email SMTP connection settings- Parameters:
userToken
- The unique login-token of a user with privileges to Edit Maintenance information.smtpServerString
- SMTP server namesmtpUserString
- SMTP user loginsmtpPasswordString
- SMTP user passwordfromAddressString
- Email from addresstoAddressString
- Email to addressuseSSL
- Whether to use ssl to send the emailsslPort
- SSL port numbersubjectText
- Text to use as subjectmessageText
- Test to use for the message- Throws:
Exception
-
isDatabaseVersion
public boolean isDatabaseVersion()- Returns:
- Whether this Claro is running with a database
-
uploadFileToChannel
public byte[] uploadFileToChannel(byte[] userToken, javax.activation.DataHandler imgdata, String userName, String fileName, int channelNr) throws ExceptionUploads file to channel and returns preview of uploaded image- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.imgdata
- The image datauserName
- The user which uploads the filefileName
- The name of the filechannelNr
- Channel to upload to- Returns:
- Preview of uploaded image
- Throws:
PrivilegeException
- User has no Edit privileges for the Maintenance.LoginException
- If no user with this login-token is found or the token is expired (20 minutes after last activity).Exception
- See Also:
Account.getConfigurationPrivileges()
-
getAbsoluteClaroServerPath
Returns the absolute path for a given path on the Claro Server- Parameters:
userToken
- The unique login-token of a user with privileges to View Maintenance information.path
- The path to create the absolute (Claro server path) for- Returns:
- Absolute path on the Claro Server
- Throws:
Exception
-
getServerList
- Throws:
Exception
-
setServerList
- Throws:
Exception
-
getClaroServers
public ArrayList<String> getClaroServers(byte[] userToken) throws PrivilegeException, LoginExceptionreturns number of available Claro servers in multiserver operation returns null if multiserver operation has not been configured For internal usage only!- Returns:
- list of servers
- Throws:
PrivilegeException
LoginException
-
getClaroBackupServers
public ArrayList<String> getClaroBackupServers(byte[] userToken) throws PrivilegeException, LoginExceptionJFR 21-okt-2015: Ticket 1154: Added this method, so that clients can get a list of backup Claro servers. returns number of available backup Claro servers in multiserver operation returns null if multiserver operation has not been configured For internal usage only!- Returns:
- list of backup servers
- Throws:
PrivilegeException
LoginException
-