| org.netbeans.spi.project.AuxiliaryConfiguration
All known Subclasses: org.netbeans.spi.project.support.ant.ExtensibleMetadataProviderImpl,
AuxiliaryConfiguration | public interface AuxiliaryConfiguration (Code) | | Ability for a project to permit other modules to insert arbitrary metadata
into the project storage area.
For example, the debugger may wish to store a list of breakpoints in the
project private settings area without relying on the exact structure of
the project. Similarly, the editor may wish to keep a parser database
associated with a project without direct support from the project type.
A module is only permitted to read and write its own metadata fragments
unless it is explicitly given permission to read and/or write other fragments
owned by another module. XML namespaces should be used to scope the data
to avoid accidental clashes.
See Also: org.netbeans.api.project.Project.getLookup author: Jesse Glick |
getConfigurationFragment | Element getConfigurationFragment(String elementName, String namespace, boolean shared)(Code) | | Retrieve a custom fragment of the project's unstructured configuration data
as a portion of a DOM tree.
This fragment should not have a parent node, to prevent unauthorized access
to other data; it may be modified by the caller, but
AuxiliaryConfiguration.putConfigurationFragment is required to insert any changes back into the project settings.
Parameters: elementName - the simple name of the element expected Parameters: namespace - an XML namespace that elementName is qualified with(may not be empty) Parameters: shared - true to look in a sharable settings area, false to look in a privatesettings area a configuration fragment, or null if none such was found |
putConfigurationFragment | void putConfigurationFragment(Element fragment, boolean shared) throws IllegalArgumentException(Code) | | Insert a custom fragment into the project's unstructured configuration data
as a portion of a DOM tree.
This fragment may have a parent node, but the implementor should ignore that,
and clone the fragment so as to be insulated from any further modifications.
If a fragment with the same name already exists, it is overwritten with the
new fragment.
Implementations ought to acquires write access from
org.netbeans.api.project.ProjectManager.mutex .
However, from client code you are well advised to explicitly enclose a
complete operation within write access, starting with
AuxiliaryConfiguration.getConfigurationFragment , to prevent race conditions.
Parameters: fragment - a DOM tree fragment; the root element must have a defined namespace Parameters: shared - true to save in a sharable settings area, false to save in a privatesettings area throws: IllegalArgumentException - if the fragment does not have a namespace or the element nameand namespace is already reserved by the project type for itsown purposes |
removeConfigurationFragment | boolean removeConfigurationFragment(String elementName, String namespace, boolean shared) throws IllegalArgumentException(Code) | | Remove a custom fragment from the project's unstructured configuration data
as a portion of a DOM tree.
Parameters: elementName - the simple name of the element which should be removed Parameters: namespace - an XML namespace that elementName is qualified with(may not be empty) Parameters: shared - true to save in a sharable settings area, false to save in a privatesettings area true if the requested fragment was actually removed, false if not throws: IllegalArgumentException - if the element name and namespace is already reservedby the project type for its own purposes |
|
|