Oxygen XML Editor 12.2 Author API

ro.sync.exml.workspace.api.util
Interface UtilAccess

All Known Subinterfaces:
AuthorUtilAccess

public interface UtilAccess

Provides access to utility methods.

Since:
11.2

Method Summary
 java.lang.String correctURL(java.lang.String url)
          Corrects the given URL by converting not allowed characters to their escaped representation.
 java.lang.String decrypt(java.lang.String toDecrypt)
          Decrypts a string using the Oxygen internal encryption system.
 java.lang.String encrypt(java.lang.String toEncrypt)
          Encrypts a string using the Oxygen internal encryption system.
 java.lang.String expandEditorVariables(java.lang.String pathWithEditorVariables, java.net.URL currentEditedURL)
          Try to expand the editor variables in a path
 java.lang.String getExtension(java.net.URL url)
          Get the file extension for this URL.
 java.lang.String getFileName(java.lang.String urlPath)
          Get the file name from a file or URL path
 boolean isSupportedImageURL(java.net.URL url)
          Check if this URL points to a supported image.
 java.io.File locateFile(java.net.URL url)
          Locate the file on disk corresponding to the URL.
 java.lang.String makeRelative(java.net.URL baseURL, java.net.URL childURL)
          Make the child URL relative to the base URL.
 java.net.URL removeUserCredentials(java.net.URL url)
          Removes the user name and password from the URL if they are present.
 

Method Detail

makeRelative

java.lang.String makeRelative(java.net.URL baseURL,
                              java.net.URL childURL)
Make the child URL relative to the base URL.

The child URL is relatively expressed to the base URL. If it is not possible, the child URL is returned.

For example if the base URL is "file://c:/projects/exml/base.prx" and the child URL is "file://c:/projects/exml/test/someTest.xml" the result will be: "test/someTest.xml"

Parameters:
baseURL - The base URL.
childURL - The child URL.
Returns:
The relative path or the childURL if a relative path cannot be computed.

correctURL

java.lang.String correctURL(java.lang.String url)
Corrects the given URL by converting not allowed characters to their escaped representation.

Parameters:
url - The URL to be corrected.
Returns:
The corrected URL. It does not return null.

removeUserCredentials

java.net.URL removeUserCredentials(java.net.URL url)
Removes the user name and password from the URL if they are present.

Parameters:
url - The URL from which the user credentials will be removed.
Returns:
The URL having the user credentials removed.
Since:
12.1

locateFile

java.io.File locateFile(java.net.URL url)
Locate the file on disk corresponding to the URL.

Parameters:
url - The URL to be checked.
Returns:
The corresponding File from the local file system or null if the URL is remote.

getExtension

java.lang.String getExtension(java.net.URL url)
Get the file extension for this URL. The extension is lower cased.

Parameters:
url - The URL to extract the extension for.
Returns:
the file extension for this URL. The extension is lower cased.

getFileName

java.lang.String getFileName(java.lang.String urlPath)
Get the file name from a file or URL path

Parameters:
urlPath - An URL path
Returns:
the file name from a file or URL path

isSupportedImageURL

boolean isSupportedImageURL(java.net.URL url)
Check if this URL points to a supported image. The image extension is used

Parameters:
url - The URL
Returns:
true if this URL points to a supported image. The image extension is used

expandEditorVariables

java.lang.String expandEditorVariables(java.lang.String pathWithEditorVariables,
                                       java.net.URL currentEditedURL)
Try to expand the editor variables in a path

Parameters:
pathWithEditorVariables - The path containing editor variables
currentEditedURL - The current edited URL
Returns:
The path with editor variables expanded.
Since:
12.1

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


encrypt

java.lang.String encrypt(java.lang.String toEncrypt)
Encrypts a string using the Oxygen internal encryption system. The encryption/decryption is application-specific so a string encrypted in one Oxygen installation cannot be decrypted in another. You can use this method if you want to store user-specific data on disk with a moderate level of security.

Parameters:
toEncrypt - The string to encrypt.
Returns:
The string encrypted using the Oxygen internal encryption system.
Since:
12.1

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


decrypt

java.lang.String decrypt(java.lang.String toDecrypt)
Decrypts a string using the Oxygen internal encryption system. The encryption/decryption is application-specific so a string encrypted in one Oxygen installation cannot be decrypted in another. You can use this method if you want to store user-specific data on disk with a moderate level of security.

Parameters:
toDecrypt - The string to decrypt.
Returns:
The string decrypted using the Oxygen internal encryption system or NULL if the string format is not understood.
Since:
12.1

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


Oxygen XML Editor 12.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.