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
  • Field Details

  • Constructor Details

    • AdminConnector

      public AdminConnector()
  • Method Details

    • isCaaSVersion

      public static boolean isCaaSVersion()
    • resetPassword

      public void resetPassword(String s)
      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 Exception
      Change 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. Exception
      Exception
      See Also:
      Description with example
    • login

      public Account login(String name, byte[] encryptedPassword, byte[] publicKey)
      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 user
      encryptedPassword - 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

      public List<Account> getAccounts(byte[] userToken) throws LoginException, PrivilegeException
      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, LoginException
      Saves 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 information
      accounts - 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, LoginException
      Removes the specified list of Accounts
      Parameters:
      userToken - The unique login-token of a user with privileges to edit Account information
      accounts - 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

      public Version getVersion()
      Returns the version number of Claro
      Returns:
      The version number of Claro
    • downloadLatestVersion

      public javax.activation.DataHandler downloadLatestVersion(String os) throws Exception
      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

      public String getProductName()
      Returns the name of the installed product
      Returns:
      The name of the installed product
    • createNewProcessingChannel

      public ProcessingChannel createNewProcessingChannel(byte[] userToken) throws PrivilegeException, LoginException
      Create 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, LoginException
      Create 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, LoginException
      Create 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, LoginException
      Create 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, LoginException
      Create 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 information
      ac - 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, LoginException
      Create 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, LoginException
      Check 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, LoginException
      Change 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 information
      channelNr - The number of the channel to change the status of
      active - 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, LoginException
      Change 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 information
      channelNrAndActive - 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, LoginException
      Change 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 information
      channelNrs - 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 information
      chanNrs - 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

      public Group createGroup(byte[] userToken, String name) throws PrivilegeException, LoginException
      Creates a new Group
      Parameters:
      userToken - The unique login-token of a user with privileges to edit Configuration information
      name - 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 information
      oldname - Old name of Group
      newname - 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, LoginException
      Changes 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, LoginException
      Removes 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

      public void copyChannel(byte[] userToken, int channr) throws PrivilegeException, LoginException
      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, IOException
      Imports 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 imported
      bytes - 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, IOException
      Exports 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, IOException
      Export 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, LoginException
      Get 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, LoginException
      Get a single channel with the given channel name.
      Parameters:
      userToken -
      name -
      Returns:
      Throws:
      PrivilegeException
      LoginException
    • getChannels

      public List<AdminChannel> getChannels(byte[] userToken) throws PrivilegeException, LoginException
      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

      public AdminChannel checkChannel(AdminChannel adminChannel)
    • getGroups

      public List<Group> getGroups()
      Returns list of Groups
      Returns:
      List of Groups
    • getFilesInFolder

      public List<String> getFilesInFolder(byte[] userToken, String foldername) throws PrivilegeException, LoginException
      Lists 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, LoginException
      Returns 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

      public List<String> 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, LoginException
      Create 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

      public String 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

      public String 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 of
      showParent - Includes information about the folders parents
      showFiles - 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

      public List<LogMessage> getLog(byte[] userToken) throws PrivilegeException, LoginException
      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

      public List<LogMessage> getErrorLog(byte[] userToken) throws PrivilegeException, LoginException
      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

      public void clearErrorLog(byte[] userToken) throws PrivilegeException, LoginException
      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

      public void clearLog(byte[] userToken) throws PrivilegeException, LoginException
      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, LoginException
      Saves 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

      public SystemInfoWrapper getSystemInfo()
      Returns system information of the system
      Returns:
      System information of the system
    • installLicense

      public void installLicense(byte[] licbytes) throws Exception
      Installs the Claro License
      Parameters:
      licbytes - The Claro License
      Throws:
      Exception
    • readLicense

      public LicenseInfoWrapper readLicense() throws Exception
      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

      public void deactivateLicense() throws Exception
      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

      public String[] 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, LoginException
      Removes 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, LoginException
      Change 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 of
      b - 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, LoginException
      Database 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

      public Task addTask(byte[] userToken) throws PrivilegeException, LoginException
      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, LoginException
      Saves 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

      public List<Task> getTasks(byte[] userToken) throws PrivilegeException, LoginException
      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
      Throws:
      PrivilegeException
      LoginException
      IOException
    • exportStatistics

      public void exportStatistics(byte[] userToken, int fromYear, int fromMonth, int fromDay, int toYear, int toMonth, int toDay) throws Exception
      Method to export statistics from the database to xml file(s) in the log folder (claro/log OR cluster/log)
      Throws:
      Exception
    • resetStatistics

      public void resetStatistics(byte[] userToken) throws Exception
      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

      public boolean isCustomerInLicense(String str)
      Returns whether special customer license is available.
      Parameters:
      str - The customer option to check for
      Returns:
      Returns whether special customer license is available.
    • getHostName

      public String getHostName() throws Exception
      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, IOException
      Export 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

      public String getJobredirectorFolder(byte[] userToken) throws PrivilegeException, LoginException
      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, LoginException
      Sets 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

      public String getGoogleVisionAPIKey(byte[] userToken) throws LoginException, PrivilegeException
      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

      public String getRemoveBGAPIKey(byte[] userToken) throws LoginException, PrivilegeException
      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, LoginException
      Sets 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, LoginException
      Sets 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

      public String getHTTPSKeystorePath(byte[] userToken) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • setHTTPSKeystorePath

      public void setHTTPSKeystorePath(byte[] userToken, String keystorePath) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • getHTTPSKeystorePassword

      public String getHTTPSKeystorePassword(byte[] userToken) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • setHTTPSKeystorePassword

      public void setHTTPSKeystorePassword(byte[] userToken, String keystorePassword) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • getCERTAlias

      public String getCERTAlias(byte[] userToken) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • setCERTAlias

      public void setCERTAlias(byte[] userToken, String alias) throws PrivilegeException, LoginException
      Throws:
      PrivilegeException
      LoginException
    • getEmailServer

      public EmailServer getEmailServer(byte[] userToken) throws LoginException, PrivilegeException
      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, LoginException
      Sets 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, LoginException
      List 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, LoginException
      Gets 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.WebServiceException
      Instructs 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.WebServiceException
      Instructs 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.WebServiceException
      Instructs 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

      public String retrieveHWInfo() throws javax.xml.ws.WebServiceException
      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 Exception
      Returns 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 data
      useBeta - 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 Exception
      Uploads 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 profile
      profiledata - The ICC profile data
      overwrite - Whether to overwrite an existing file with the same name
      Throws:
      Exception
    • deleteICCProfile

      public void deleteICCProfile(byte[] userToken, String iccProfileName) throws Exception
      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 Exception
      Method 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 name
      smtpUserString - SMTP user login
      smtpPasswordString - SMTP user password
      fromAddressString - Email from address
      toAddressString - Email to address
      useSSL - Whether to use ssl to send the email
      sslPort - SSL port number
      subjectText - Text to use as subject
      messageText - 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 Exception
      Uploads 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 data
      userName - The user which uploads the file
      fileName - The name of the file
      channelNr - 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

      public String getAbsoluteClaroServerPath(byte[] userToken, String path) throws Exception
      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

      public String getServerList(byte[] userToken) throws Exception
      Throws:
      Exception
    • setServerList

      public void setServerList(byte[] userToken, String serverList) throws Exception
      Throws:
      Exception
    • getClaroServers

      public ArrayList<String> getClaroServers(byte[] userToken) throws PrivilegeException, LoginException
      returns 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, LoginException
      JFR 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