IVersionedDocument Interface
- public interface IVersionedDocument
extends IDocument
This interface extends IDocument to provide support for versioning documents. Versioned documents allow several different
files to refer to the same virtual object. Note that this is distinct form local versioning and version control systems for
source code. This is versioning at an abstract level where a document, ex. web service versioning, process versioning.
Versioned documents have a virtual name. All versions in the same directory with the same virtual name, are versioned
instances of the same object. The virtual name serves as the name for the virtual object. A typical naming convention is to append
the version number to the virtual name for the names of the versions. (ex. Foo.jws -> Foo1.jws) Note that the virtual name does not
include any path. The path is the same as the path for the existing document. You cannot have versions that point to virtual names in
other directories.
-
All Superinterfaces
-
ICookieSupport
, IDocument
, IDriverSupport
, IElement
, IPropertySupport
public static final String |
-
EVENT_VersionInfoChanged
- This is the key for an application event that indicates that the version information for a URI has changed.
|
public boolean |
-
confirmSetDefaultVersion ()
- Displays a dialog allowing the user to confirm the effects of calling setDefault().
|
public String |
-
getVirtualName ()
- Obtain the virtual name for this document.
|
public boolean |
-
isDefaultVersion ()
- Determines whether this document instance is the default version.
|
public boolean |
-
isValidVersion ()
- Indicates whether the document is currently a valid version.
|
public boolean |
-
setDefaultVersion ()
- Updates metadata to cause this document instance to become the default version.
|
Methods from interface com.bea.ide.document.IDocument |
addElementChangeListener , getHandlerId , getIFile , getInputStream , getReader , getRootElement , getRootElement , getURI , getViewInfo , isBinary , isEditable , isModified , isReadOnly , makeEditable , onOpen , onRemove , onSave , reload , removeElementChangeListener , waitForRootElement
|
EVENT_VersionInfoChanged
public static final String
EVENT_VersionInfoChanged
- This is the key for an application event that indicates that the version information for a URI has changed. If version information
is stored in the file, such that a file system change will occur to the URI of the document whenever version information changes,
this event is optional. If version information is stored entirely externally, meaning that there will NOT be a file system event
for the document's URI when version information changes, the owning extension is responsible for firing this event on the application.
The value passed should be the URI of the document for which version information has changed. Listeners may use the IVersionedDocument
or the IDocumentInfo interfaces to query the state of versioning information on the URI and respond accordingly.
confirmSetDefaultVersion() Method
public boolean confirmSetDefaultVersion()
Displays a dialog allowing the user to confirm the effects of calling setDefault(). This may be invoked before calling setDefault()
where appropriate.
Returns
- true if the user wants setDefaultVersion() to be called, false otherwise
getVirtualName() Method
public String
getVirtualName()
Obtain the virtual name for this document. All documents that share a virtual name are versions of the same document.
Returns
- String representing the virtual name for this document
isDefaultVersion() Method
public boolean isDefaultVersion()
Determines whether this document instance is the default version. The default version is the one that will be associated with the
virtual name when invoked (ex. when invoking a webservice using the virtual .jws.
Returns
- true if this instance is the default version, false otherwise
isValidVersion() Method
public boolean isValidVersion()
Indicates whether the document is currently a valid version. If the document does not properly implement the
version's interface, then this method should return true in order to allow feedback to the user.
Returns
- true if the document implements the versions interface correctly, false otherwise
setDefaultVersion() Method
public boolean setDefaultVersion()
Updates metadata to cause this document instance to become the default version.
Returns
- true if this version instance was successfully set to be the default or if it was already the default. false otherwise.