wt.viewmarkup
Interface ViewMarkUpService

All Known Implementing Classes:
StandardViewMarkUpService, ViewMarkUpServiceFwd

public interface ViewMarkUpService

The ViewMarkUpService contains the methods to create, query, and delete the classes in the viewmarkup package.

Supported API: false

Extendable: false


Method Summary
 Void deleteDerivedImage(DerivedImage derivedImage)
          Deletes the passed DerivedImage, unless it is the default representation for the associated Representable.
 Void deleteDerivedImage(DerivedImage derivedImage, boolean noDefaultsOK)
          If the noDefaultsOK argument is true, unconditionally deletes the passed Representation.
 Void deleteDerivedImage(WTSet derivedImages, boolean noDefaultsOK)
          If the noDefaultsOK argument is true, unconditionally deletes the passed DerivedImages.
 Void deleteMarkUp(MarkUp markUp)
          Remove the passed MarkUp for the passed Markable.
 Void deleteMarkUp(WTSet markUps)
          Deletes the passed MarkUps

Supported API: false
 QueryResult findDuplicateDerivedImages(DerivedImage image)
          Finds other DerivedImages for the associated Representable with the same name and representationType as the passed DerviedImage.
 ConfigSpec getDerivedFromConfigSpec(DerivedImage derivedImage)
          Gets the WTObject playing the role of derivedFromConfigSpec for the passed DerivedImage.
 QueryResult getMarkUps(Viewable viewable)
          Get all the associated MarkUps of a Viewable

Supported API: false
 WTKeyedMap getMarkUps(WTCollection viewables)
          Get all the MarkUps associated to a collection of Viewables.
 PublishingProhibition getPublishingProhibition(Representable representable)
          Gets the single most restrictive PublishingProhibition for a Representable; if null is returned, then the Representable is publishable.
 WTValuedMap getPublishingProhibition(WTCollection representables)
          Gets the single most restrictive PublishingProhibition for each Representable; if a Representable is not returned as a key in the WTValuedMap, then that Representable is publishable

Supported API: false
 ConfigSpec getRepresentableConfigSpec(DerivedImage derivedImage)
          Gets the WTObject playing the role of representableConfigSpec for the passed DerivedImage.
 Viewable getViewable(MarkUp markUp)
          Get the Viewable for the passed MarkUp

Supported API: false
 WTValuedMap getViewable(WTCollection markUps)
          Gets the associated Viewables for the passed MarkUps.
 void lockMarkUp(MarkUp markUp)
          Lock the passed MarkUp for the current WTPrincipal.
 DerivedImage postStoreDerivedImage(DerivedImage derivedImage, Boolean defaultRepresentation)
          This method should be called after a DerivedImage has been persisted with storeDerivedImage and after its contents have been uploaded.
 ConfigSpec setDerivedFromConfigSpec(ConfigSpec configSpec, DerivedImage derivedImage)
          Copies the passed ConfigSpec and stores it as the object playing the role of derivedFromonfigSpec for the passed DerivedImage.
 ConfigSpec setRepresentableConfigSpec(ConfigSpec configSpec, DerivedImage derivedImage)
          Copies the passed ConfigSpec and stores it as the object playing the role of representableConfigSpec for the passed DerivedImage.
 DerivedImage storeDerivedImage(Representable representable, String imageName, String imageDescription, String imageAdditionalInfo, RepresentationType imageType, DerivationType derivationType, ConfigSpec representableConfigSpec, ConfigSpec derivedFromConfigSpec, RepresentationContributor derivedFrom)
          Store a DerivedImage in the database without any content..
 DerivedImage storeDerivedImage(Representable representable, String imageName, String imageDescription, String imageAdditionalInfo, RepresentationType imageType, DerivationType derivationType, ConfigSpec representableConfigSpec, ConfigSpec derivedFromConfigSpec, RepresentationContributor derivedFrom, String CADFormName, String CADPartName)
          Store a DerivedImage in the database without any content..
 MarkUp storeMarkUp(Viewable viewable, MarkUp markUp)
          Store a MarkUp for the passed Viewable.
 void unLockMarkUp(MarkUp markUp)
          Remove the passed MarkUp for the passed Markable.
 

Method Detail

storeMarkUp

public MarkUp storeMarkUp(Viewable viewable,
                          MarkUp markUp)
                   throws WTException
Store a MarkUp for the passed Viewable.

Supported API: false

Parameters:
viewable -
markUp -
Returns:
MarkUp
Throws:
WTException

getMarkUps

public QueryResult getMarkUps(Viewable viewable)
                       throws WTException
Get all the associated MarkUps of a Viewable

Supported API: false

Parameters:
viewable -
Returns:
QueryResult
Throws:
WTException

getMarkUps

public WTKeyedMap getMarkUps(WTCollection viewables)
                      throws WTException
Get all the MarkUps associated to a collection of Viewables.

Supported API: false

Parameters:
viewables - WTCollection of Viewables
Returns:
WTKeyedMap - keys are the Viewables and values are a WTList of MarkUp objects. A Viewable with no MarkUp will not be included in the returned WTKeyedMap.
Throws:
WTException

getViewable

public Viewable getViewable(MarkUp markUp)
                     throws WTException
Get the Viewable for the passed MarkUp

Supported API: false

Parameters:
markUp -
Returns:
Viewable
Throws:
WTException

getViewable

public WTValuedMap getViewable(WTCollection markUps)
                        throws WTException
Gets the associated Viewables for the passed MarkUps.

Supported API: false

Parameters:
markUps - WTCollection of MarkUp objects
Returns:
WTValuedMap - keys are the Markups and the values are the Viewables
Throws:
WTException

deleteMarkUp

public Void deleteMarkUp(MarkUp markUp)
                  throws WTException
Remove the passed MarkUp for the passed Markable.

Supported API: false

Parameters:
markUp -
Returns:
Void
Throws:
WTException

deleteMarkUp

public Void deleteMarkUp(WTSet markUps)
                  throws WTException
Deletes the passed MarkUps

Supported API: false

Parameters:
markUps - WTCollection of MarkUp objects
Returns:
Void
Throws:
WTException

unLockMarkUp

public void unLockMarkUp(MarkUp markUp)
                  throws WTException,
                         WTPropertyVetoException
Remove the passed MarkUp for the passed Markable.

Supported API: false

Parameters:
markUp -
Throws:
WTException
WTPropertyVetoException

lockMarkUp

public void lockMarkUp(MarkUp markUp)
                throws WTException,
                       WTPropertyVetoException
Lock the passed MarkUp for the current WTPrincipal.

Supported API: false

Parameters:
markUp -
Throws:
WTException
WTPropertyVetoException

storeDerivedImage

public DerivedImage storeDerivedImage(Representable representable,
                                      String imageName,
                                      String imageDescription,
                                      String imageAdditionalInfo,
                                      RepresentationType imageType,
                                      DerivationType derivationType,
                                      ConfigSpec representableConfigSpec,
                                      ConfigSpec derivedFromConfigSpec,
                                      RepresentationContributor derivedFrom)
                               throws WTException,
                                      WTPropertyVetoException,
                                      PropertyVetoException
Store a DerivedImage in the database without any content.. The image will be associated to the passed Representable and have a defaultRepresentation attribute of false. Its other attributes will be set according to the passed input arguments. Only representable, imageName, imageType, and derivationType are required. The other attribute arguments may be null. If one or more configSpec objects are passed, they must be PersistableConfigSpecs. Each configSpec will be copied and the copy stored with the DerivedImage. User must have READ permission for the associated Representable object.

Supported API: false

Parameters:
representable - The object playing the role of representable for the DerivedImage. Required.
imageName - Name of the DerivedImage. Required.
imageDescription - Description of the DerivedImage. Optional.
imageAdditionalInfo - Additional information for the DerivedImage. Optional.
imageType - RepresentationType of the DerivedImage. Required.
derivationType - DerivationType of the DerivedImage. Required.
representableConfigSpec - Object playing the role of representableConfigSpec. Must be a WTObject. Optional.
derivedFromConfigSpec - Object playing the role of derivedFromConfigSpec. Must be a WTObject. Optional.
derivedFrom - Object playing the role of derivedFrom. Optional.
Returns:
DerivedImage
Throws:
WTException
WTPropertyVetoException
PropertyVetoException

storeDerivedImage

public DerivedImage storeDerivedImage(Representable representable,
                                      String imageName,
                                      String imageDescription,
                                      String imageAdditionalInfo,
                                      RepresentationType imageType,
                                      DerivationType derivationType,
                                      ConfigSpec representableConfigSpec,
                                      ConfigSpec derivedFromConfigSpec,
                                      RepresentationContributor derivedFrom,
                                      String CADFormName,
                                      String CADPartName)
                               throws WTException,
                                      WTPropertyVetoException,
                                      PropertyVetoException
Store a DerivedImage in the database without any content.. The image will be associated to the passed Representable and have a defaultRepresentation attribute of false. Its other attributes will be set according to the passed input arguments. Only representable, imageName, imageType, and derivationType are required. The other attribute arguments may be null. If one or more configSpec objects are passed, they must be WTObjects. Each configSpec will be copied and the copy stored with the DerivedImage. User must have READ permission for the associated Representable object.

Supported API: false

Parameters:
representable - The object playing the role of representable for the DerivedImage. Required.
imageName - Name of the DerivedImage. Required.
imageDescription - Description of the DerivedImage. Optional.
imageAdditionalInfo - Additional information for the DerivedImage. Optional.
imageType - RepresentationType of the DerivedImage. Required.
derivationType - DerivationType of the DerivedImage. Required.
representableConfigSpec - Object playing the role of representableConfigSpec. Must be a WTObject. Optional.
derivedFromConfigSpec - Object playing the role of derivedFromConfigSpec. Must be a WTObject. Optional.
derivedFrom - Object playing the role of derivedFrom. Optional.
CADFormName -
CADPartName -
Returns:
DerivedImage
Throws:
WTException
WTPropertyVetoException
PropertyVetoException

postStoreDerivedImage

public DerivedImage postStoreDerivedImage(DerivedImage derivedImage,
                                          Boolean defaultRepresentation)
                                   throws WTException,
                                          PropertyVetoException
This method should be called after a DerivedImage has been persisted with storeDerivedImage and after its contents have been uploaded. It deletes any other DerivedImages with the same name and RepresentationType associated with the same Representable, unless those images have markups, in which case the image is not deleted and the Representable will have two DerivedImages with the same name and type but different create timestamps. This method also sets the defaultRepresentation attribute on the DerivedImage and, if this attribute is true, stores the DerivedImage's thumbnail with the associated Representable. The passed DerivedImage will be made the default if one of the following is true: (1) the associated Representable has no other default Representations (after deleting others with the same name and type) or (2) the passed default argument is true.

Supported API: false

Parameters:
derivedImage -
defaultRepresentation -
Returns:
DerivedImage
Throws:
WTException
PropertyVetoException

deleteDerivedImage

public Void deleteDerivedImage(DerivedImage derivedImage)
                        throws WTException
Deletes the passed DerivedImage, unless it is the default representation for the associated Representable. If it is the default, it will be deleted only if it is the only Representation associated with the Representable. Otherwise, another Representation must be made the default before this one is deleted. Throws a RepresentationException if the Representation is not deleted.

Supported API: false

Parameters:
derivedImage -
Returns:
Void
Throws:
WTException

deleteDerivedImage

public Void deleteDerivedImage(DerivedImage derivedImage,
                               boolean noDefaultsOK)
                        throws WTException
If the noDefaultsOK argument is true, unconditionally deletes the passed Representation. If the noDefaultsOK argument is false, deletes the passed Representation only if its defaultRepresentation attribute is false or it is the only Representation for the associated Representable. Throws a RepresentationException if the Representation is not deleted.

Supported API: false

Parameters:
derivedImage -
noDefaultsOK -
Returns:
Void
Throws:
WTException

deleteDerivedImage

public Void deleteDerivedImage(WTSet derivedImages,
                               boolean noDefaultsOK)
                        throws WTException
If the noDefaultsOK argument is true, unconditionally deletes the passed DerivedImages. If the noDefaultsOK argument is false, deletes a passed DerivedImage only if its defaultRepresentation attribute is false or it is the only Representation for the associated Representable. Throws a RepresentationException if any of the DerivedImages is not deleted.

Supported API: false

Parameters:
derivedImages - WTSet of DerivedImage objects
noDefaultsOK -
Returns:
Void
Throws:
WTException

getDerivedFromConfigSpec

public ConfigSpec getDerivedFromConfigSpec(DerivedImage derivedImage)
                                    throws WTException
Gets the WTObject playing the role of derivedFromConfigSpec for the passed DerivedImage. Returns null if no derivedFromConfigSpec is found.

Supported API: false

Parameters:
derivedImage -
Returns:
ConfigSpec
Throws:
WTException

setDerivedFromConfigSpec

public ConfigSpec setDerivedFromConfigSpec(ConfigSpec configSpec,
                                           DerivedImage derivedImage)
                                    throws WTException,
                                           WTPropertyVetoException
Copies the passed ConfigSpec and stores it as the object playing the role of derivedFromonfigSpec for the passed DerivedImage. The pre-existing derivedFromConfigSpec, if any, is deleted. The passed DerivedImage must be persisted and the passed config spec must be a PersistableConfigSpec. A ViewMarkUpException is thrown if either of these is not true.

Supported API: false

Parameters:
configSpec -
derivedImage -
Returns:
ConfigSpec
Throws:
WTException
WTPropertyVetoException

getRepresentableConfigSpec

public ConfigSpec getRepresentableConfigSpec(DerivedImage derivedImage)
                                      throws WTException
Gets the WTObject playing the role of representableConfigSpec for the passed DerivedImage. Returns null if no representableConfigSpec is found.

Supported API: false

Parameters:
derivedImage -
Returns:
ConfigSpec
Throws:
WTException

setRepresentableConfigSpec

public ConfigSpec setRepresentableConfigSpec(ConfigSpec configSpec,
                                             DerivedImage derivedImage)
                                      throws WTException,
                                             WTPropertyVetoException
Copies the passed ConfigSpec and stores it as the object playing the role of representableConfigSpec for the passed DerivedImage. The pre-existing representableConfigSpec, if any, is deleted. The passed ConfigSpec must be a PersistableConfigSpec and the passed DerivedImage must be persisted. A ViewMarkUpException is thrown if either of these is not true.

Supported API: false

Parameters:
configSpec -
derivedImage -
Returns:
ConfigSpec
Throws:
WTException
WTPropertyVetoException

findDuplicateDerivedImages

public QueryResult findDuplicateDerivedImages(DerivedImage image)
                                       throws WTException
Finds other DerivedImages for the associated Representable with the same name and representationType as the passed DerviedImage.

Supported API: false

Parameters:
image -
Returns:
QueryResult
Throws:
WTException

getPublishingProhibition

public PublishingProhibition getPublishingProhibition(Representable representable)
                                               throws WTException
Gets the single most restrictive PublishingProhibition for a Representable; if null is returned, then the Representable is publishable.

Supported API: false

Parameters:
representable -
Returns:
PublishingProhibition
Throws:
WTException

getPublishingProhibition

public WTValuedMap getPublishingProhibition(WTCollection representables)
                                     throws WTException
Gets the single most restrictive PublishingProhibition for each Representable; if a Representable is not returned as a key in the WTValuedMap, then that Representable is publishable

Supported API: false

Parameters:
representables - WTCollection of Representable objects
Returns:
WTValuedMap - keys are the Representables and the values are PublishingProhibition objects
Throws:
WTException