Oxygen XML Editor 16.1 Author API

ro.sync.exml.workspace.api
Interface Workspace

All Superinterfaces:
ColorThemeUtilities, WorkspaceUtilities
All Known Subinterfaces:
AuthorWorkspaceAccess, PluginWorkspace, StandalonePluginWorkspace

@API(type=NOT_EXTENDABLE,
     src=PUBLIC)
public interface Workspace
extends WorkspaceUtilities

Provides access to workspace specific information and actions.

Since:
11.2

Method Summary
 boolean close(java.net.URL url)
          Closes the editor specified by the URL.
 boolean closeAll()
          Closes all the editors.
 java.net.URL createNewEditor(java.lang.String extension, java.lang.String contentType, java.lang.String content)
          This is available only in the standalone Oxygen version (not available in the Oxygen Eclipse plugin).
Create a new "Untitled" editor.
 void delete(java.net.URL url)
          Delete the resource identified by the specified URL.
 boolean isStandalone()
          Check if the extension is used in the Oxygen stand alone or Eclipse plugin version.
 boolean open(java.net.URL url)
          Opens the file at the specified URL in a new editor.
 boolean open(java.net.URL url, java.lang.String imposedPage)
          Opens the file at the specified URL in a new editor.
 boolean open(java.net.URL url, java.lang.String imposedPage, java.lang.String imposedContentType)
          Opens the file at the specified URL in a new editor by specifying an imposed page and an imposed content type.
 void refreshInProject(java.net.URL url)
          In a new file appeared as a child of a folder in the project, use this method to refresh the parent folder.
 void saveAll()
          Saves the content of all opened and unsaved editors.
 void setParentFrameTitle(java.lang.String parentFrameTitle)
          Set a title on the parent frame.
 
Methods inherited from interface ro.sync.exml.workspace.api.WorkspaceUtilities
chooseDirectory, chooseFile, chooseFile, chooseFile, chooseFiles, chooseURL, chooseURL, chooseURLPath, chooseURLPath, clearImageCache, createJavaProcess, getDataSourceAccess, getLicenseInformationProvider, getParentFrame, getPreferencesDirectory, getUserInterfaceLanguage, getVersion, getVersionBuildID, openInExternalApplication, showConfirmDialog, showConfirmDialog, showErrorMessage, showInformationMessage, showStatusMessage
 
Methods inherited from interface ro.sync.exml.workspace.api.util.ColorThemeUtilities
getColorTheme, getImageInverter
 

Method Detail

open

boolean open(java.net.URL url)
Opens the file at the specified URL in a new editor.

Parameters:
url - The URL of the file to be opened.
Returns:
true if the operation has succeeded.

open

boolean open(java.net.URL url,
             java.lang.String imposedPage)
Opens the file at the specified URL in a new editor.

Parameters:
url - The URL of the file to be opened.
imposedPage - The imposed page for opening the URL. One of the page related constants from EditorPageConstants.
Returns:
true if the operation has succeeded.
Since:
13

open

boolean open(java.net.URL url,
             java.lang.String imposedPage,
             java.lang.String imposedContentType)
Opens the file at the specified URL in a new editor by specifying an imposed page and an imposed content type. The imposed content type is used only in the Oxygen standalone application, it is not used in the Author Component and Eclipse plugin applications.

Parameters:
url - The URL of the file to be opened.
imposedPage - The imposed page for opening the URL. Can be null to perform the default behavior.
imposedContentType - The imposed content type, one of the constants in the interface ro.sync.exml.editor.ContentTypes.
This is useful if for example the URL does not have a file extension (maybe it is a CMS resource) but the caller of the API knows that it is XML. In this case the caller can provide the "text/xml" imposed content type for it to avoid Oxygen asking what type of resource the URL is.
Another use case is for DITA Map URLs without an extension. The caller can pass the "application/ditamap" content type value to the API. In the standalone application Oxygen will ask the user where to open the DITA Map (DITA Maps Manager or the main editor) and will continue the open procedure.
In the Oxygen Eclipse plugin the DITA Map will be opened directly in the DITA Maps Manager view.
Can be null to perform the default behavior.
Returns:
true if the operation has succeeded.
Since:
15.2

saveAll

void saveAll()
Saves the content of all opened and unsaved editors.


close

boolean close(java.net.URL url)
Closes the editor specified by the URL.

If the editor has unsaved content, the user will be given the opportunity to save it.

Parameters:
url - The url of the editor to be closed.
Returns:
true if the editor was successfully closed, and false if the editor could not be closed.

closeAll

boolean closeAll()
Closes all the editors.

If there are editors with unsaved content, the user will be given the opportunity to save them.

Returns:
true if the editors were successfully closed, and false if the editors are still open.

delete

void delete(java.net.URL url)
            throws java.io.IOException
Delete the resource identified by the specified URL. Currently supported protocols are:

Parameters:
url - The URL from where to delete a resource.
Throws:
java.io.IOException

refreshInProject

void refreshInProject(java.net.URL url)
In a new file appeared as a child of a folder in the project, use this method to refresh the parent folder.

Parameters:
url - The new resource

createNewEditor

java.net.URL createNewEditor(java.lang.String extension,
                             java.lang.String contentType,
                             java.lang.String content)
This is available only in the standalone Oxygen version (not available in the Oxygen Eclipse plugin).
Create a new "Untitled" editor. The editor content is not saved on disk, this method is equivalent to using the "File->New" action.

Parameters:
extension - The editor extension ("xml" or "dita" or "xsl" or "xsd", etc...)
contentType - The content type which can take values like: "text/xml" or "text/xsl" or "text/xsd", etc... If NULL, the content type will be automatically detected from the extension.
content - The XML content will be used to load the new editor from.
Returns:
The URL of the created new editor.
Since:
12.1

isStandalone

boolean isStandalone()
Check if the extension is used in the Oxygen stand alone or Eclipse plugin version.

Returns:
true if this is the stand-alone Oxygen version or false if it is the Oxygen Eclipse plug-in version.

setParentFrameTitle

void setParentFrameTitle(java.lang.String parentFrameTitle)
Set a title on the parent frame. This is available only in the standalone Oxygen version (not available in the Oxygen Eclipse plugin). If NULL, will reset to the default title.

Parameters:
parentFrameTitle - The new title to set on the parent frame. If NULL, will reset to the default title.
Since:
12.1

Oxygen XML Editor 16.1 Author API

© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.