com.wewebu.ow.server.app
Class OwClipboard

java.lang.Object
  extended by com.wewebu.ow.server.app.OwClipboard

public class OwClipboard
extends Object

Clipboard object, holds a list of clipboard items for cut, copy, paste functions.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
static interface OwClipboard.OwClipboardContent
           Clipboard item base interface for all clipboard content items.
static interface OwClipboard.OwClipboardOperation
           Interface for clipboard operation type.
 
Field Summary
static int CONTENT_TYPE_EMPTY
          clipboard content type definition
static int CONTENT_TYPE_OW_FIELD
          clipboard content type definition for Fields
static int CONTENT_TYPE_OW_OBJECT
          clipboard content type definition
static int CONTENT_TYPE_OW_WORKITEM
          clipboard content type definition
static OwClipboard.OwClipboardOperation COPY
          the COPY operation.
static OwClipboard.OwClipboardOperation CUT
          the CUT operation
protected  List<OwClipboard.OwClipboardContent> m_contentList
          list with OwClipboardContent Items
protected  int m_iContentType
          the current content type in the clipboard
 
Constructor Summary
OwClipboard()
           
 
Method Summary
 void addContent(OwField content_p)
          Add content (field content) to the clipboard.
 void addContent(OwObject content_p, OwObject parent_p)
          add an OwObject type item
 boolean canAdd()
          Check if the maximum object size for clipboard was reached.
 void clearContent()
          empty the clipboard
 List<OwClipboard.OwClipboardContent> getContent()
          get the contained clipboard OwClipboardContent items as an iterator
 int getContentType()
          get the type of the current content
 boolean getCut()
          get the mark the clipboard content as cut flag, i.e.
 void init(OwMainAppContext owMainAppContext_p)
          Initialize the clipboard
 void postWarningMessage()
          Post a warning message.
 void setContent(List clipboarditems_p, int iContenttype_p)
          set the content of the clipboard
 void setContent(OwField content_p)
          Set the content of the field to clipboard.
 void setContent(OwObject content_p, OwObject parent_p)
          set a single OwObject type item
 void setCut()
          mark the clipboard content as cut, i.e.
 void setCut(boolean flag_p)
          mark the clipboard content cut for flag==true, as copy for flag==false i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE_EMPTY

public static final int CONTENT_TYPE_EMPTY
clipboard content type definition

See Also:
Constant Field Values

CONTENT_TYPE_OW_OBJECT

public static final int CONTENT_TYPE_OW_OBJECT
clipboard content type definition

See Also:
Constant Field Values

CONTENT_TYPE_OW_WORKITEM

public static final int CONTENT_TYPE_OW_WORKITEM
clipboard content type definition

See Also:
Constant Field Values

CONTENT_TYPE_OW_FIELD

public static final int CONTENT_TYPE_OW_FIELD
clipboard content type definition for Fields

See Also:
Constant Field Values

COPY

public static final OwClipboard.OwClipboardOperation COPY
the COPY operation.


CUT

public static final OwClipboard.OwClipboardOperation CUT
the CUT operation


m_iContentType

protected int m_iContentType
the current content type in the clipboard


m_contentList

protected List<OwClipboard.OwClipboardContent> m_contentList
list with OwClipboardContent Items

Constructor Detail

OwClipboard

public OwClipboard()
Method Detail

getContent

public List<OwClipboard.OwClipboardContent> getContent()
get the contained clipboard OwClipboardContent items as an iterator

Returns:
List of OwClipboardContent

setContent

public void setContent(OwObject content_p,
                       OwObject parent_p)
                throws Exception
set a single OwObject type item

Parameters:
content_p - the clipboard content object
parent_p - the parent object used for cut operation, can be null
Throws:
Exception

setCut

public void setCut()
mark the clipboard content as cut, i.e. origin objects will be deleted on insert


setCut

public void setCut(boolean flag_p)
mark the clipboard content cut for flag==true, as copy for flag==false i.e. origin objects will be deleted on insert or not.

Parameters:
flag_p -
Since:
2.5.2.2

getCut

public boolean getCut()
get the mark the clipboard content as cut flag, i.e. origin objects will be deleted on insert


setContent

public void setContent(List clipboarditems_p,
                       int iContenttype_p)
set the content of the clipboard

Parameters:
clipboarditems_p - list of OwClipboardContent items
iContenttype_p - int as defined with CONTENT_TYPE_...

addContent

public void addContent(OwObject content_p,
                       OwObject parent_p)
                throws Exception
add an OwObject type item

Parameters:
content_p - the clipboard content object
parent_p - the parent object used for cut operation, can be null
Throws:
Exception

clearContent

public void clearContent()
empty the clipboard


getContentType

public int getContentType()
get the type of the current content

Returns:
int content type or CONTENT_TYPE_EMPTY if clipboard does not contain anything

addContent

public void addContent(OwField content_p)
                throws Exception
Add content (field content) to the clipboard.

Parameters:
content_p - - the field
Throws:
Exception

setContent

public void setContent(OwField content_p)
                throws Exception
Set the content of the field to clipboard.

Parameters:
content_p - - the field
Throws:
Exception

canAdd

public boolean canAdd()
Check if the maximum object size for clipboard was reached.

Returns:
true if the item can be added to clipboard.
Since:
3.0.0.0

postWarningMessage

public void postWarningMessage()
Post a warning message.

Since:
3.0.0.0

init

public void init(OwMainAppContext owMainAppContext_p)
Initialize the clipboard

Parameters:
owMainAppContext_p -
Since:
3.0.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.