com.elpical.jclaro.inspector.ws.server
Class IspImpl

java.lang.Object
  extended by com.elpical.jclaro.inspector.ws.server.IspImpl

@MTOM
@BindingType(value="http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/")
public class IspImpl
extends java.lang.Object

This Webservices interface contains the methods for accessing Claro Inspector.
The interface is published by JAX-WS RI with : http://<hostname>:<port>/jclaroinspectorjaxws/job?wsdl

if you use Java, you can use the following code snippet:

        import com.elpical.jclaro.inspector.ws.client.IspImpl;
        import com.elpical.jclaro.inspector.ws.client.IspImplService;
     
        URL baseUrl = com.elpical.jclaro.inspector.ws.client.IspImplService.class.getResource(".");
        URL url = new URL(baseUrl, "http://"+hostname+":"+portnumber+"/jclaroinspectorjaxws/job?wsdl");
        IspImplService anis = new IspImplService(url, new QName("http://server.ws.inspector.jclaro.elpical.com/", "IspImplService"));
        IspImpl port;
        if (asMTOM)
                port = anis.getIspImplPort(new MTOMFeature(true,8000));
        else
                port = anis.getIspImplPort();

The package is included in ClaroInspector-<version>.jar (in the jclaroui/jclaro/inspector/lib folder of the Claro installation)

After obtaining a valid port, the first thing to do is setting a ClientID, by calling setClientID().
The ID is only needed for optimization reasons on the server and must be used with isQueueUpdateAvailable() and getQueue() The ID can be a randomly retrieved integer and is valid during the session of the client

All Available Claro channels can be retrieved with getChannelNames().

The files from Claro can be retrieved with getProcessedFile() and getOriginalFile()
If a file is in use on the client side, setInUseByUser() must be called.
If the file is not in use anymore, setInUse(id,false) must be called.

If a file is changed on the client side, setOriginalFile() or setProcessedFile() must be called.
After a file is approved on the client side, useInspectedFileOriginal() or useInspectedFileProcessed() must be called.
If a file is rejected on the clientside, useInspectedFileNone must be called.
The useInspectedFileOriginal(),useInspectedFileProcessed() or useInspectedFileNone() methods will remove the image from the inspector queue.

The fileformat may not be changed on the client side (featured only for internal use)

Optionally a preview image can be downloaded

An example of the client implementation : InspectorWebservices_example.java (see folder examples_integration if the Claro installation)


Constructor Summary
IspImpl()
          IspImpl should be instanced with IspImplService (see snippet above)
 
Method Summary
 void addClientID(int clientid)
          adds an id for the client
 void deleteConfiguration(java.lang.String name)
          deletes a configuration (For internal use only)
 java.lang.String getCauseMessage(int id)
          gets the cause messsage
 java.lang.String getChannelName(int id)
          gets the channelname
 java.util.ArrayList getChannelNames()
          retrieves the installed channels
 java.util.ArrayList getChannelNamesWithGroupNames()
          retrieves the installed channels with their groupnames
 java.util.ArrayList getClaroServers()
          returns number of available Claro servers in multiserver operation returns null if multiserver operation has not been configured For internal usage only!
 java.util.ArrayList getConfigurationNames()
          retrieves all the names of the configurations, which are previously saved (For internal use only)
 int[] getCropInfo(int id)
          returns cropdata (For internal use only)
 java.lang.String getDCData(int id, java.lang.String name)
          returns the DC data (For internal use only)
 int getEpsEncoding(int id)
          returns the output EPS encoding, in case the output format is EPS (For internal use only)
 int getEpsPreview(int id)
          returns the output EPS preview, in case the output format is EPS (For internal use only)
 java.util.ArrayList getExtraDataColumns()
          retrieves a list of extra data columns for Inspector For internal usage only!
 java.lang.String getImageName(int id)
          gets the imagename
 java.lang.String getInUseByUser(int id)
          returns the name of user which has the image in use
 java.lang.String getIPTCData(int id, int recordNo, int datasetNo)
          returns the IPTC data (For internal use only)
 float getJpegCompression(int id)
          returns the output jpeg compression
 java.lang.String getLogInfo(int id)
          gets the log info
 javax.activation.DataHandler getOriginalFile(int id)
          retrieves the original image file
 java.lang.String getOriginalFileName(int id)
          gets the original image filename
 java.lang.String getOutfileformat(int id)
          returns the output file format (For internal use only)
 java.lang.String getPageNr(int id)
          returns the pagenumber of the image in the Pdf (For internal use only)
 int getPdfImage(int id)
          returns the pdfimage (For internal use only)
 javax.activation.DataHandler getPreviewFile(int id)
          retrieves the preview image file
 java.lang.String getPreviewFileName(int id)
          gets the preview image filename
 javax.activation.DataHandler getProcessedFile(int id)
          retrieves the processed image file
 java.lang.String getProcessedFileName(int id)
          gets the processed image filename
 javax.activation.DataHandler getProperties()
          retrieves inspector properties (For internal use only)
 java.util.ArrayList getQueue(int clientid, java.util.ArrayList channelNames)
          retrieves a list of image id's for all available images which should be inspected
 java.util.ArrayList getQueueInUse()
          retrieves a list of id's for all images which are in use by other users
 java.util.ArrayList getQueueSentBack()
          retrieves a list of id's for all images which are sent back by other users
 java.lang.String getReleaseDate(int id)
          returns the releasedate of the image (For internal use only)
 java.lang.String getSentBackByUser(int id)
          returns the name of user which has sent back the image
 java.lang.String getServerVersion()
          retrieves the server version
 java.lang.String getXMPData(int id, java.lang.String field)
          returns the XMP data (For internal use only)
 boolean isImageIdAvailable(int id)
          checks if there is an image is really available for download
 boolean isInUse(int id)
          determines if the image is in use by another user
 boolean isJobInfoPresent(int id)
          return if job information is present (For internal use only)
 boolean isPdfImage(int id)
          return if image is a pdf image (For internal use only)
 boolean isQueueUpdateAvailable(int clientid)
          checks if there is a queue update available for the related client id After the method getQueue() is called, the update flag will be reset
 boolean isSentBack(int id)
          determines if the image is sent back by another user
 byte[] openConfigurations(java.lang.String name)
          opens a previously saved configuration (For internal use only)
 void removeClientID(int clientid)
          removes an id
 void saveConfigurations(java.lang.String name, byte[] data)
          saves a configuration (For internal use only)
 void setCurfileformat(int id, java.lang.String curfileformat)
          sets the current file format (For internal use only)
 void setInspectedEditingTime(int id, long set)
          set the Editing time
 void setInUse(int id, boolean set)
          sets the image is in use
 void setInUseByUser(int id, java.lang.String set)
          sets the image is in use by user if this method is used no further call to setInUse() is necessary
 void setOriginalFile(int id, javax.activation.DataHandler imgdata)
          sets the original image file as the inspected file
 void setProcessedFile(int id, javax.activation.DataHandler imgdata)
          sets the processed image file as the inspected file
 void setSentBack(int id, boolean set)
          sets the image as sent back
 void setSentBackByUser(int id, java.lang.String set)
          sets the image as sent back by user if this method is used no further call to setSentBack() is necessary
 boolean testConnection()
          Checks the server connection, if failed throws an exception
 void useInspectedFileNone(int id, java.lang.String username)
          use no file as the inspected file
 void useInspectedFileOriginal(int id, java.lang.String username)
          use the original file as the inspected file
 void useInspectedFileProcessed(int id, java.lang.String username)
          use the processed file as the inspected file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IspImpl

public IspImpl()
IspImpl should be instanced with IspImplService (see snippet above)

Method Detail

testConnection

public boolean testConnection()
Checks the server connection, if failed throws an exception

Returns:
true if connected to the server
Throws:
java.lang.Exception

getServerVersion

public java.lang.String getServerVersion()
retrieves the server version

Returns:
server version
Throws:
java.lang.Exception

getChannelNames

public java.util.ArrayList getChannelNames()
retrieves the installed channels

Returns:
all installed channels
Throws:
java.lang.Exception

getChannelNamesWithGroupNames

public java.util.ArrayList getChannelNamesWithGroupNames()
retrieves the installed channels with their groupnames

Returns:
all installed channels : first name is channelname second name is groupname, if no group exists an empty string is filled in if a password exists for the group, the groupname is extended with %$#password
Throws:
java.lang.Exception

getConfigurationNames

public java.util.ArrayList getConfigurationNames()
retrieves all the names of the configurations, which are previously saved (For internal use only)

Returns:
configuration names
Throws:
java.lang.Exception

openConfigurations

public byte[] openConfigurations(java.lang.String name)
                          throws java.lang.Exception
opens a previously saved configuration (For internal use only)

Parameters:
name - The configuration file name to be opened
Returns:
the configuration as a byte array
Throws:
java.lang.Exception

saveConfigurations

public void saveConfigurations(java.lang.String name,
                               byte[] data)
                        throws java.io.IOException
saves a configuration (For internal use only)

Parameters:
name - The configuration file name to be opened
data - the configuration as a byte array
Throws:
java.lang.Exception
java.io.IOException

deleteConfiguration

public void deleteConfiguration(java.lang.String name)
deletes a configuration (For internal use only)

Parameters:
name - The configuration file name to be deleted
Throws:
java.lang.Exception

getProperties

public javax.activation.DataHandler getProperties()
retrieves inspector properties (For internal use only)

Returns:
DataHandler for the returned file
Throws:
java.lang.Exception

getQueue

public java.util.ArrayList getQueue(int clientid,
                                    java.util.ArrayList channelNames)
retrieves a list of image id's for all available images which should be inspected

Parameters:
clientid -
channelNames - list of channelnames which are related to the images
Returns:
list of id's
Throws:
java.lang.Exception

getQueueInUse

public java.util.ArrayList getQueueInUse()
retrieves a list of id's for all images which are in use by other users

Returns:
list of id's
Throws:
java.lang.Exception

getQueueSentBack

public java.util.ArrayList getQueueSentBack()
retrieves a list of id's for all images which are sent back by other users

Returns:
list of id's
Throws:
java.lang.Exception

addClientID

public void addClientID(int clientid)
adds an id for the client

Parameters:
clientid -
Throws:
java.lang.Exception

removeClientID

public void removeClientID(int clientid)
removes an id

Parameters:
clientid -
Throws:
java.lang.Exception

isQueueUpdateAvailable

public boolean isQueueUpdateAvailable(int clientid)
checks if there is a queue update available for the related client id After the method getQueue() is called, the update flag will be reset

Parameters:
clientid -
Returns:
true if update available otherwise false
Throws:
java.lang.Exception

isImageIdAvailable

public boolean isImageIdAvailable(int id)
checks if there is an image is really available for download

Parameters:
id - the related image id
Returns:
true if the id is in the queue otherwise false
Throws:
java.lang.Exception

getOriginalFile

public javax.activation.DataHandler getOriginalFile(int id)
retrieves the original image file

Parameters:
id - the related image id
Returns:
DataHandler for the original image file if the datahandler can not be generated, an exception is thrown
Throws:
javax.xml.ws.WebServiceException

setOriginalFile

public void setOriginalFile(int id,
                            javax.activation.DataHandler imgdata)
sets the original image file as the inspected file

Parameters:
id - the related image id
imgdata - DataHandler for the original image file
Throws:
javax.xml.ws.WebServiceException

getOriginalFileName

public java.lang.String getOriginalFileName(int id)
gets the original image filename

Parameters:
id - the related image id
Returns:
the original image filename
Throws:
javax.xml.ws.WebServiceException

getProcessedFile

public javax.activation.DataHandler getProcessedFile(int id)
retrieves the processed image file

Parameters:
id - the related image id
Returns:
DataHandler for the processed image file if the datahandler can not be generated, an exception is thrown
Throws:
javax.xml.ws.WebServiceException

setProcessedFile

public void setProcessedFile(int id,
                             javax.activation.DataHandler imgdata)
sets the processed image file as the inspected file

Parameters:
id - the related image id
imgdata - DataHandler for the processed image file
Throws:
javax.xml.ws.WebServiceException

getProcessedFileName

public java.lang.String getProcessedFileName(int id)
gets the processed image filename

Parameters:
id - the related image id
Returns:
the processed image filename
Throws:
javax.xml.ws.WebServiceException

getPreviewFile

public javax.activation.DataHandler getPreviewFile(int id)
retrieves the preview image file

Parameters:
id - the related image id
Returns:
DataHandler for the preview image file if the datahandler can not be generated, an exception is thrown
Throws:
javax.xml.ws.WebServiceException

useInspectedFileProcessed

public void useInspectedFileProcessed(int id,
                                      java.lang.String username)
use the processed file as the inspected file

Parameters:
id - the related image id
username - name of the user which inspected the file
Throws:
javax.xml.ws.WebServiceException

useInspectedFileOriginal

public void useInspectedFileOriginal(int id,
                                     java.lang.String username)
use the original file as the inspected file

Parameters:
id - the related image id
username - name of the user which inspected the file
Throws:
javax.xml.ws.WebServiceException

useInspectedFileNone

public void useInspectedFileNone(int id,
                                 java.lang.String username)
use no file as the inspected file

Parameters:
id - the related image id
username - name of the user which inspected the file
Throws:
javax.xml.ws.WebServiceException

getPreviewFileName

public java.lang.String getPreviewFileName(int id)
gets the preview image filename

Parameters:
id - the related image id
Returns:
the preview image filename
Throws:
javax.xml.ws.WebServiceException

getChannelName

public java.lang.String getChannelName(int id)
gets the channelname

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

getImageName

public java.lang.String getImageName(int id)
gets the imagename

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

getCauseMessage

public java.lang.String getCauseMessage(int id)
gets the cause messsage

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

getLogInfo

public java.lang.String getLogInfo(int id)
gets the log info

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

setInUse

public void setInUse(int id,
                     boolean set)
sets the image is in use

Parameters:
id - the related image id
Throws:
javax.xml.ws.WebServiceException

setInUseByUser

public void setInUseByUser(int id,
                           java.lang.String set)
sets the image is in use by user if this method is used no further call to setInUse() is necessary

Parameters:
id - the related image id
set -
Throws:
javax.xml.ws.WebServiceException

isInUse

public boolean isInUse(int id)
determines if the image is in use by another user

Parameters:
id - the related image id
Returns:
true if in use otherwise false
Throws:
javax.xml.ws.WebServiceException

getInUseByUser

public java.lang.String getInUseByUser(int id)
returns the name of user which has the image in use

Parameters:
id - the related image id
Returns:
the username or null if no user has the image in use
Throws:
javax.xml.ws.WebServiceException

setSentBack

public void setSentBack(int id,
                        boolean set)
sets the image as sent back

Parameters:
id - the related image id
Throws:
javax.xml.ws.WebServiceException

setSentBackByUser

public void setSentBackByUser(int id,
                              java.lang.String set)
sets the image as sent back by user if this method is used no further call to setSentBack() is necessary

Parameters:
id - the related image id
set -
Throws:
javax.xml.ws.WebServiceException

isSentBack

public boolean isSentBack(int id)
determines if the image is sent back by another user

Parameters:
id - the related image id
Returns:
true if in use otherwise false
Throws:
javax.xml.ws.WebServiceException

getSentBackByUser

public java.lang.String getSentBackByUser(int id)
returns the name of user which has sent back the image

Parameters:
id - the related image id
Returns:
the username or null if no user has sent back the image
Throws:
javax.xml.ws.WebServiceException

getIPTCData

public java.lang.String getIPTCData(int id,
                                    int recordNo,
                                    int datasetNo)
returns the IPTC data (For internal use only)

Parameters:
id - the related image id
recordNo -
datasetNo -
Returns:
the related IPTC data or empty string if no data is there
Throws:
javax.xml.ws.WebServiceException

getXMPData

public java.lang.String getXMPData(int id,
                                   java.lang.String field)
returns the XMP data (For internal use only)

Parameters:
id - the related image id
field -
Returns:
the related XMP data or empty string if no data is there
Throws:
javax.xml.ws.WebServiceException

isPdfImage

public boolean isPdfImage(int id)
return if image is a pdf image (For internal use only)

Parameters:
id - the related image id
Returns:
true if pdf otherwise false
Throws:
javax.xml.ws.WebServiceException

getDCData

public java.lang.String getDCData(int id,
                                  java.lang.String name)
returns the DC data (For internal use only)

Parameters:
id - the related image id
name -
Returns:
the related DC data or empty string if no data is there
Throws:
javax.xml.ws.WebServiceException

isJobInfoPresent

public boolean isJobInfoPresent(int id)
return if job information is present (For internal use only)

Parameters:
id - the related image id
Returns:
true if pdf otherwise false
Throws:
javax.xml.ws.WebServiceException

getCropInfo

public int[] getCropInfo(int id)
returns cropdata (For internal use only)

Parameters:
id - the related image id
Returns:
cropframe
Throws:
javax.xml.ws.WebServiceException

getOutfileformat

public java.lang.String getOutfileformat(int id)
returns the output file format (For internal use only)

Parameters:
id - the related image id
Returns:
JPEG,TIFF,EPS,PSD
Throws:
javax.xml.ws.WebServiceException

getJpegCompression

public float getJpegCompression(int id)
returns the output jpeg compression

Parameters:
id - the related image id
Returns:
0..1
Throws:
javax.xml.ws.WebServiceException

getEpsEncoding

public int getEpsEncoding(int id)
returns the output EPS encoding, in case the output format is EPS (For internal use only)

Parameters:
id - the related image id
Returns:
integer
Throws:
javax.xml.ws.WebServiceException

getEpsPreview

public int getEpsPreview(int id)
returns the output EPS preview, in case the output format is EPS (For internal use only)

Parameters:
id - the related image id
Returns:
integer
Throws:
javax.xml.ws.WebServiceException

getPageNr

public java.lang.String getPageNr(int id)
returns the pagenumber of the image in the Pdf (For internal use only)

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

getReleaseDate

public java.lang.String getReleaseDate(int id)
returns the releasedate of the image (For internal use only)

Parameters:
id - the related image id
Returns:
string
Throws:
javax.xml.ws.WebServiceException

getPdfImage

public int getPdfImage(int id)
returns the pdfimage (For internal use only)

Parameters:
id - the related image id
Returns:
integer
Throws:
javax.xml.ws.WebServiceException

setCurfileformat

public void setCurfileformat(int id,
                             java.lang.String curfileformat)
sets the current file format (For internal use only)

Parameters:
id - the related image id
curfileformat - : TIFF,JPEG,EPS,PSD,PNG,GIF
Throws:
javax.xml.ws.WebServiceException

getExtraDataColumns

public java.util.ArrayList getExtraDataColumns()
retrieves a list of extra data columns for Inspector For internal usage only!

Returns:
list of extra columns
Throws:
java.lang.Exception

getClaroServers

public java.util.ArrayList getClaroServers()
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:
java.lang.Exception

setInspectedEditingTime

public void setInspectedEditingTime(int id,
                                    long set)
set the Editing time

Parameters:
id - the related image id
Editing - time (in ms) This is the period used for editing
Throws:
javax.xml.ws.WebServiceException


Copyright © 2010 Elpical Software B.V. All Rights Reserved.