com.ptc.wvs.server.ui
Class MarkupHelper

java.lang.Object
  extended bycom.ptc.wvs.server.ui.MarkupHelper
All Implemented Interfaces:
RemoteAccess

public class MarkupHelper
extends Object
implements RemoteAccess

Server side classes to handle the manipulation of Markups the logic in these methods is dicated by the behavior of ProductView



Supported API: false

Extendable: false


Field Summary
private static String AST
           
private static String DELIMITER
           
private static String EMK
           
private static String ErrorPrefix
           
private static String LOCKEDBYOTHER
           
private static String LOCKEDBYYOU
           
private static String MARKUP_TEMP_DIR
           
private static String NOTLOCKED
           
static String RESOURCE
           
private  StringBuffer result
           
(package private) static boolean SERVER
           
private static boolean VERBOSE
           
private static WVSProperties wvsProperties
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
MarkupHelper()
           
 
Method Summary
private static String constructETBForBadMarkup(WTMarkUp markup, String selectedID)
           
static Object[] createAnnotationSet(String WCID, String name, String description, String tag, Locale locale)
          Creates a new annotation set

Supported API: false
private static Object[] createMarkup(Viewable obj, String name, String description, String tag, Locale locale)
          Create a new markup

Supported API: false
static Object[] deleteAllAnnotationSets(String objectReference, Locale locale)
          Delete all annotation sets

Supported API: false
static Object[] deleteAnnotationSet(String objectReference, Locale locale)
          Deletes an annotation set

Supported API: false
static Object[] getAnnotationETB(String WCID, String selectedID)
          Returns the annotation set table (definition of the markups) for the specified representation

Supported API: false
static Object[] getAnnotationETBForClipboard(String oids)
           
static String getMarkupUrl(String objectReference, String fileType)
          Returns the URL to the specific Markup

Supported API: false
private  String getResult()
           
static String getViewFile(String markupref)
          Returns the viewFile of a markup

Supported API: false
static String getViewStyle(String markupref)
          Returns the viewStyle of a markup

Supported API: false
static Object[] lockAnnotationSet(String objectReference, Locale locale)
          Locks an annotation set

Supported API: false
static Boolean processETB(String etbData)
          Processes the ETB data from ProductView and associates it as additionalInfo on each Markup

Supported API: false
static Object[] saveMarkupContent(String objectReference, String name, String description, byte[] data, String fileType, Locale locale)
          Saves the content of the markup

Supported API: false
private static Object[] saveMarkupContent(String objectReference, String name, String description, String fSpec, String fileType, Locale locale)
          Saves the content of the markup

Supported API: false
static Object[] setAllowCopyForward(String objectReference, boolean allowCopy, Locale locale)
          Set the allow copy forward flag on the Markup

Supported API: false
static Object[] unlockAnnotationSet(String objectReference, Locale locale)
          Unlocks an annotation set

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

ErrorPrefix

private static final String ErrorPrefix
See Also:
Constant Field Values

result

private StringBuffer result

NOTLOCKED

private static final String NOTLOCKED
See Also:
Constant Field Values

LOCKEDBYYOU

private static final String LOCKEDBYYOU
See Also:
Constant Field Values

LOCKEDBYOTHER

private static final String LOCKEDBYOTHER
See Also:
Constant Field Values

DELIMITER

private static final String DELIMITER
See Also:
Constant Field Values

AST

private static final String AST
See Also:
Constant Field Values

EMK

private static final String EMK
See Also:
Constant Field Values

wvsProperties

private static WVSProperties wvsProperties

VERBOSE

private static boolean VERBOSE

MARKUP_TEMP_DIR

private static String MARKUP_TEMP_DIR

RESOURCE

public static final String RESOURCE
See Also:
Constant Field Values
Constructor Detail

MarkupHelper

public MarkupHelper()
Method Detail

getResult

private String getResult()

getAnnotationETB

public static Object[] getAnnotationETB(String WCID,
                                        String selectedID)
Returns the annotation set table (definition of the markups) for the specified representation

Supported API: false

Parameters:
WCID - The object reference of the Representation
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing the markup information

getAnnotationETBForClipboard

public static Object[] getAnnotationETBForClipboard(String oids)

constructETBForBadMarkup

private static String constructETBForBadMarkup(WTMarkUp markup,
                                               String selectedID)

getMarkupUrl

public static String getMarkupUrl(String objectReference,
                                  String fileType)
Returns the URL to the specific Markup

Supported API: false

Parameters:
objectReference - The object reference of the Markup
fileType - Either ast or gif
Returns:
String URL string to markup

createAnnotationSet

public static Object[] createAnnotationSet(String WCID,
                                           String name,
                                           String description,
                                           String tag,
                                           Locale locale)
Creates a new annotation set

Supported API: false

Parameters:
WCID - The object reference of the Representation
name - The name of the new markup
description - The description of the new markup
tag - Additional information
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing the markup name

lockAnnotationSet

public static Object[] lockAnnotationSet(String objectReference,
                                         Locale locale)
Locks an annotation set

Supported API: false

Parameters:
objectReference - The object reference of the Markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

unlockAnnotationSet

public static Object[] unlockAnnotationSet(String objectReference,
                                           Locale locale)
Unlocks an annotation set

Supported API: false

Parameters:
objectReference - The object reference of the Markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

setAllowCopyForward

public static Object[] setAllowCopyForward(String objectReference,
                                           boolean allowCopy,
                                           Locale locale)
Set the allow copy forward flag on the Markup

Supported API: false

Parameters:
objectReference - The object reference of the Markup
allowCopy - the new copy state to be set
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

deleteAnnotationSet

public static Object[] deleteAnnotationSet(String objectReference,
                                           Locale locale)
Deletes an annotation set

Supported API: false

Parameters:
objectReference - The object reference of the Markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

deleteAllAnnotationSets

public static Object[] deleteAllAnnotationSets(String objectReference,
                                               Locale locale)
Delete all annotation sets

Supported API: false

Parameters:
objectReference - The object reference of the Markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

processETB

public static Boolean processETB(String etbData)
Processes the ETB data from ProductView and associates it as additionalInfo on each Markup

Supported API: false

Parameters:
etbData - ETB data from ProductView
Returns:
boolean success true

saveMarkupContent

public static Object[] saveMarkupContent(String objectReference,
                                         String name,
                                         String description,
                                         byte[] data,
                                         String fileType,
                                         Locale locale)
Saves the content of the markup

Supported API: false

Parameters:
objectReference - The object reference of the Markup
name - The name of the Markup
description - The description of the Markup
data - The Markup content
fileType - The file type
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

saveMarkupContent

private static Object[] saveMarkupContent(String objectReference,
                                          String name,
                                          String description,
                                          String fSpec,
                                          String fileType,
                                          Locale locale)
Saves the content of the markup

Supported API: false

Parameters:
objectReference - The object reference of the Markup
name - The name of the Markup
description - The description of the Markup
fSpec - The file containing the markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message

createMarkup

private static Object[] createMarkup(Viewable obj,
                                     String name,
                                     String description,
                                     String tag,
                                     Locale locale)
Create a new markup

Supported API: false

Parameters:
obj - The Markup
name - The name of the Markup
description - The description of the Markup
Returns:
Object[] Object[0] a Boolean defining success(TRUE)/failure Object[1] a String containing success/failure message Object[2] a Markup object

getViewStyle

public static String getViewStyle(String markupref)
Returns the viewStyle of a markup

Supported API: false

Parameters:
markupref - The object reference of the markup
Returns:
String[] The ProductView viewer

getViewFile

public static String getViewFile(String markupref)
Returns the viewFile of a markup

Supported API: false

Parameters:
markupref - The object reference of the markup
Returns:
String[] The ProductView viewer