wt.representation
Interface RepresentationService

All Known Implementing Classes:
RepresentationServiceFwd, StandardRepresentationService

public interface RepresentationService

The RepresentationService contains the methods to create, query, and delete Representations and associated files.

Supported API: false

Extendable: false


Method Summary
 Void deleteRepresentation(Representation representation)
          Deletes the passed Representation, unless it is the default representation for the associated Representable.
 Void deleteRepresentation(Representation representation, boolean noDefaultsOK)
          If the noDefaultsOK argument is true, unconditionally deletes the passed Representation.
 Void deleteRepresentation(WTSet representations, boolean noDefaultsOK)
          If the noDefaultsOK argument is true, unconditionally deletes the passed Representations.
 void emitReadyToPublishEvent(Persistable persistable)
          

Supported API: false
 void emitReadyToPublishEvent(Vector objects, ConfigSpec configSpec)
          

Supported API: false
 ApplicationData get3DThumbnail(Representable representable)
          Get the associated Thumbnail for the passed Representable.
 ApplicationData get3DThumbnail(Representation representation)
          Get the associated Thumbnail for the passed Representation.
 Representation getDefaultRepresentation(Representable representable)
          Get the default Representation for the passed Representable.
 WTValuedMap getDefaultRepresentation(WTCollection representables)
          Gets the default Representations for the passed Representables.
 QueryResult getOutOfDateRepresentationContributors(Representation representation)
          Return all the associated RepresentationContributors that are responsible for making the Representation out of date.
 Representable getRepresentable(Representation representation)
          Get the Representable for the passed Representation

Supported API: false
 WTValuedMap getRepresentable(WTCollection representations)
          Gets the Representables for the passed Representations

Supported API: false
 QueryResult getRepresentations(Representable representable)
          Return all the associated Representations for the associated Representable

Supported API: false
 WTKeyedMap getRepresentations(WTCollection representables)
          Return all the associated Representations for the passed Representables.
 ApplicationData getThumbnail(Representable representable)
          Get the associated Thumbnail for the passed Representable.
 ApplicationData getThumbnail(Representation representation)
          Get the associated Thumbnail for the passed Representation.
 Representation makeDefaultRepresentation(Representable representable, Representation representation)
          Makes the passed Representation the default representation for the passed Representable.
 Representation storeRepresentation(Representation representation, Representable representable, String representationName, String representationDescription, RepresentationType representationType)
          Sets the representation attributes of the passed Representation and stores it in the database without any content.
 

Method Detail

getThumbnail

public ApplicationData getThumbnail(Representable representable)
                             throws WTException
Get the associated Thumbnail for the passed Representable. Returns null if no thumbnail is found and throws a RepresentationException if more than one thumbnail is found.

Supported API: false

Parameters:
representable -
Returns:
ApplicationData
Throws:
WTException

getThumbnail

public ApplicationData getThumbnail(Representation representation)
                             throws WTException
Get the associated Thumbnail for the passed Representation. Returns null if no thumbnail is found and throws a RepresentationException if more than one thumbnail is found.

Supported API: false

Parameters:
representation -
Returns:
ApplicationData
Throws:
WTException

getOutOfDateRepresentationContributors

public QueryResult getOutOfDateRepresentationContributors(Representation representation)
                                                   throws WTException
Return all the associated RepresentationContributors that are responsible for making the Representation out of date. This list would normally be displayed to the user to decide if the Representation is still useable as is or should be re-published.

Supported API: false

Parameters:
representation -
Returns:
QueryResult
Throws:
WTException

getRepresentations

public QueryResult getRepresentations(Representable representable)
                               throws WTException
Return all the associated Representations for the associated Representable

Supported API: false

Parameters:
representable -
Returns:
QueryResult
Throws:
WTException

getRepresentations

public WTKeyedMap getRepresentations(WTCollection representables)
                              throws WTException
Return all the associated Representations for the passed Representables.

Supported API: false

Parameters:
representables - WTCollection of Representables
Returns:
WTKeyedMap - keys are the Representables and values a WTList of the Representations associated with that Representable. A Representable without any Representation will not be included in the returned WTKeyedMap.
Throws:
WTException

getRepresentable

public Representable getRepresentable(Representation representation)
                               throws WTException
Get the Representable for the passed Representation

Supported API: false

Parameters:
representation -
Returns:
Representable
Throws:
WTException

getRepresentable

public WTValuedMap getRepresentable(WTCollection representations)
                             throws WTException
Gets the Representables for the passed Representations

Supported API: false

Parameters:
representations - WTCollection of Representations
Returns:
WTValuedMap - keys are the Representations and values are the Representables
Throws:
WTException

storeRepresentation

public Representation storeRepresentation(Representation representation,
                                          Representable representable,
                                          String representationName,
                                          String representationDescription,
                                          RepresentationType representationType)
                                   throws WTException,
                                          WTPropertyVetoException,
                                          PropertyVetoException
Sets the representation attributes of the passed Representation and stores it in the database without any content. The Representation's defaultRepresentation attribute will be set to false. Its other attributes will be set according to the passed input arguments. Only representable, representationName and representationType are required. The user must have READ permission for the Representable.

Supported API: false

Parameters:
representation -
representable -
representationName -
representationDescription -
representationType -
Returns:
Representation
Throws:
WTException
WTPropertyVetoException
PropertyVetoException

deleteRepresentation

public Void deleteRepresentation(Representation representation)
                          throws WTException
Deletes the passed Representation, 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 may be deleted. Throws a RepresentationException if the Representation is not deleted.

Supported API: false

Parameters:
representation -
Returns:
Void
Throws:
WTException

deleteRepresentation

public Void deleteRepresentation(Representation representation,
                                 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:
representation -
noDefaultsOK - Modifies method behavior if passed Representation is a default Representation. Set to true if it OK for the associated Representable to have Representations without one being designated the default. In this case, the passed Representation will be unconditionally deleted even if it a default Representation. Otherwise, the passed Representation will only be deleted if it is not a default Representation or is the only Representation associated with the Representable.
Returns:
Void
Throws:
WTException

deleteRepresentation

public Void deleteRepresentation(WTSet representations,
                                 boolean noDefaultsOK)
                          throws WTException
If the noDefaultsOK argument is true, unconditionally deletes the passed Representations. If the noDefaultsOK argument is false, deletes the passed Representations only if the Representation's defaultRepresentation attribute is false or it is the only Representation for the associated Representable. Throws a RepresentationException if any of the Representations is not deleted.

Supported API: false

Parameters:
representations - WTSet of Representations
noDefaultsOK - Modifies method behavior if a passed Representation is a default Representation. Set to true if it is OK for the associated Representable to have Representations without one being designated as the default. In this case, the passed Representation will be unconditionally deleted even if it is a default Representation. Otherwise, a Representation will only be deleted if it is not a default Representation or it is the only Representation associated with the Representable.
Returns:
Void
Throws:
WTException

getDefaultRepresentation

public Representation getDefaultRepresentation(Representable representable)
                                        throws WTException
Get the default Representation for the passed Representable.

Supported API: false

Parameters:
representable -
Returns:
Representation
Throws:
WTException

getDefaultRepresentation

public WTValuedMap getDefaultRepresentation(WTCollection representables)
                                     throws WTException
Gets the default Representations for the passed Representables.

Supported API: false

Parameters:
representables - WTCollection of Representables
Returns:
WTValuedMap - keys are the Representables and values are the default Representations for the Representables. A Representable without a default Representation will not be included in the returned WTValuedMap
Throws:
WTException

makeDefaultRepresentation

public Representation makeDefaultRepresentation(Representable representable,
                                                Representation representation)
                                         throws WTException,
                                                PropertyVetoException
Makes the passed Representation the default representation for the passed Representable. Thumbnail content will be copied from the passed Representation to the Representable.

Supported API: false

Parameters:
representable -
representation -
Returns:
Representation
Throws:
WTException
PropertyVetoException

emitReadyToPublishEvent

public void emitReadyToPublishEvent(Persistable persistable)
                             throws WTException


Supported API: false

Parameters:
persistable -
Throws:
WTException

emitReadyToPublishEvent

public void emitReadyToPublishEvent(Vector objects,
                                    ConfigSpec configSpec)
                             throws WTException


Supported API: false

Parameters:
objects -
configSpec -
Throws:
WTException

get3DThumbnail

public ApplicationData get3DThumbnail(Representable representable)
                               throws WTException
Get the associated Thumbnail for the passed Representable. Returns null if no thumbnail is found and throws a RepresentationException if more than one thumbnail is found.

Supported API: false

Parameters:
representable -
Returns:
ApplicationData
Throws:
WTException

get3DThumbnail

public ApplicationData get3DThumbnail(Representation representation)
                               throws WTException
Get the associated Thumbnail for the passed Representation. Returns null if no thumbnail is found and throws a RepresentationException if more than one thumbnail is found.

Supported API: false

Parameters:
representation -
Returns:
ApplicationData
Throws:
WTException