public interface PropertyHandler
PropertyHandler
interface defines methods for importing and
exporting resource properties.Modifier and Type | Method and Description |
---|---|
boolean |
canExport(PropertyExportContext context,
boolean isCollection)
Returns true, if this handler can run a successful export based on the
specified context.
|
boolean |
canImport(PropertyImportContext context,
boolean isCollection)
Returns true, if this handler can run a property import based on the
specified context.
|
boolean |
exportProperties(PropertyExportContext exportContext,
boolean isCollection)
Exports properties to the given context.
|
Map<? extends PropEntry,?> |
importProperties(PropertyImportContext importContext,
boolean isCollection)
Imports, modifies or removes properties according the the
change list available from
the import context. |
boolean canExport(PropertyExportContext context, boolean isCollection)
context
- isCollection
- PropertyHandler
is export properties
given the specified parameters.boolean exportProperties(PropertyExportContext exportContext, boolean isCollection) throws RepositoryException
IOHandler.exportContent(ExportContext, boolean)
.exportContext
- isCollection
- RepositoryException
- If an attempt is made to export properties
even if canExport(PropertyExportContext, boolean)
returns false or if some other unrecoverable error occurs.boolean canImport(PropertyImportContext context, boolean isCollection)
context
- isCollection
- PropertyHandler
can import properties
given the specified parameters.Map<? extends PropEntry,?> importProperties(PropertyImportContext importContext, boolean isCollection) throws RepositoryException
change list
available from
the import context. Note, that according to JSR 170 setting a property
value to null
is equivalent to its removal.
The return value of this method must be used to provided detailed information about any kind of failures.
importContext
- isCollection
- RepositoryException
- If
canImport(PropertyImportContext, boolean)
returns false for the given parameters or if some other unrecoverable
error occurred. Note, that normal failure of a property update must be
reported with the return value and should not result in an exception.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.