Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.picture.web
Class PictureManagerBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.picture.web.PictureManagerBean
All Implemented Interfaces:
Serializable, PictureManager

@Name(value="pictureManager")
@Scope(value=CONVERSATION)
public class PictureManagerBean
extends Object
implements PictureManager, Serializable

Author:
Laurent Doguin
See Also:
Serialized Form

Constructor Summary
PictureManagerBean()
           
 
Method Summary
 String addPicture()
          Creates and saves a picture document.
 String crop()
           
 void destroy()
           
 void download(DocumentView docView)
           
 String getCropCoords()
           
 Blob getFileContent()
          Gets the content of the Picture.
 String getFilename()
          Gets the filename of the uploaded file.
 String getFileurlPicture()
          Gets the fileurl.
 Integer getIndex()
          Gets the index.
 ArrayList getSelectItems()
          Gets the selectedItems.
 void initialize()
           
 Boolean isImageMagickAvailable()
           
 String remoteDownload(String patternName, String docID, String blobPropertyName, String filename)
           
 void resetFields()
          Listener reinitializing values at every Document changes.
 String rotate90left()
          Turns every view of a picture 90 degrees to the left.
 String rotate90right()
          Turns every view of a picture 90 degrees to the right.
 void setCropCoords(String cropCoords)
           
 void setFileContent(Blob fileContent)
          Sets the content of the Picture.
 void setFilename(String filename)
          Sets the filename of the uploaded file.
 void setFileurlPicture(String fileurlPicture)
          Sets the fileurl.
 void setIndex(Integer index)
          Sets the index.
 void setSelectItems(ArrayList selectItems)
          Sets the selectedItems.
static String urlPopup(String url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PictureManagerBean

public PictureManagerBean()
Method Detail

initialize

@Create
public void initialize()
                throws Exception
Specified by:
initialize in interface PictureManager
Throws:
Exception

getFileurlPicture

public String getFileurlPicture()
                         throws ClientException
Description copied from interface: PictureManager
Gets the fileurl. FileUrl is used to create valid link expression for the download function from the index of the picture's views.

Specified by:
getFileurlPicture in interface PictureManager
Returns:
a String holding the fileurl.
Throws:
ClientException

setFileurlPicture

public void setFileurlPicture(String fileurlPicture)
Description copied from interface: PictureManager
Sets the fileurl. FileUrl is used to create valid link expression for the download function from the index of the picture's views.

Specified by:
setFileurlPicture in interface PictureManager
Parameters:
fileurlPicture - a String holding the fileurl.

getSelectItems

public ArrayList getSelectItems()
                         throws ClientException
Description copied from interface: PictureManager
Gets the selectedItems. This array contains an index and the title of each picture's view. It's used to dynamically the selected view.

Specified by:
getSelectItems in interface PictureManager
Returns:
an Array holding the selectItems.
Throws:
ClientException

setSelectItems

public void setSelectItems(ArrayList selectItems)
Description copied from interface: PictureManager
Sets the selectedItems. This array contains an index and the title of each picture's view. It's used to dynamically the selected view.

Specified by:
setSelectItems in interface PictureManager
Parameters:
selectItems - an Array holding the selectItems.

addPicture

public String addPicture()
                  throws Exception
Description copied from interface: PictureManager
Creates and saves a picture document.

Specified by:
addPicture in interface PictureManager
Throws:
Exception

rotate90left

public String rotate90left()
                    throws ClientException,
                           IOException
Description copied from interface: PictureManager
Turns every view of a picture 90 degrees to the left.

Specified by:
rotate90left in interface PictureManager
Throws:
ClientException
IOException

rotate90right

public String rotate90right()
                     throws ClientException,
                            IOException
Description copied from interface: PictureManager
Turns every view of a picture 90 degrees to the right.

Specified by:
rotate90right in interface PictureManager
Throws:
ClientException
IOException

crop

public String crop()
            throws ClientException,
                   IOException
Specified by:
crop in interface PictureManager
Throws:
ClientException
IOException

resetFields

@Observer(value={"documentSelectionChanged","documentChanged"})
@BypassInterceptors
public void resetFields()
Description copied from interface: PictureManager
Listener reinitializing values at every Document changes.

Specified by:
resetFields in interface PictureManager

remoteDownload

@WebRemote
public String remoteDownload(String patternName,
                                       String docID,
                                       String blobPropertyName,
                                       String filename)
                      throws ClientException
Throws:
ClientException

urlPopup

@WebRemote
public static String urlPopup(String url)

download

public void download(DocumentView docView)
              throws ClientException
Specified by:
download in interface PictureManager
Throws:
ClientException

destroy

@Destroy
public void destroy()
Specified by:
destroy in interface PictureManager

getFilename

public String getFilename()
Description copied from interface: PictureManager
Gets the filename of the uploaded file.

Specified by:
getFilename in interface PictureManager
Returns:
a String holding the filename.

setFilename

public void setFilename(String filename)
Description copied from interface: PictureManager
Sets the filename of the uploaded file.

Specified by:
setFilename in interface PictureManager
Parameters:
filename - a String holding the filename.

getFileContent

public Blob getFileContent()
Description copied from interface: PictureManager
Gets the content of the Picture. It's the uploaded file.

Specified by:
getFileContent in interface PictureManager
Returns:
a Blob holding the uploaded file

setFileContent

public void setFileContent(Blob fileContent)
Description copied from interface: PictureManager
Sets the content of the Picture. It's the uploaded file.

Specified by:
setFileContent in interface PictureManager
Parameters:
fileContent - a Blob holding the uploaded file

getIndex

public Integer getIndex()
Description copied from interface: PictureManager
Gets the index. This index is used to display the selected picture in view_picture.

Specified by:
getIndex in interface PictureManager
Returns:
an Integer holding the index.

setIndex

public void setIndex(Integer index)
Description copied from interface: PictureManager
Sets the index. This index is used to display the selected picture in view_picture.

Specified by:
setIndex in interface PictureManager
Parameters:
index - an Integer holding the index.

getCropCoords

public String getCropCoords()
Specified by:
getCropCoords in interface PictureManager

setCropCoords

public void setCropCoords(String cropCoords)
Specified by:
setCropCoords in interface PictureManager

isImageMagickAvailable

public Boolean isImageMagickAvailable()
                               throws Exception
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.