public class FileToFileReference extends Object implements ValueToReferenceConverterSPI
Constructor and Description |
---|
FileToFileReference() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object o,
ReferenceContext context)
Can this SPI implementation convert the specified object to an
ExternalReferenceSPI? This test should be as lightweight as possible, and
will usually be based on the Class of the object supplied.
|
ExternalReferenceSPI |
convert(Object o,
ReferenceContext context)
Return a FileReference
|
public boolean canConvert(Object o, ReferenceContext context)
ValueToReferenceConverterSPI
canConvert
in interface ValueToReferenceConverterSPI
context
- a ReferenceContext to use if required by the plugin, the
ability to convert should be interpreted in the scope of this
context. In general the context probably not used by most
implementations but it's here if required.public ExternalReferenceSPI convert(Object o, ReferenceContext context) throws ValueToReferenceConversionException
convert
in interface ValueToReferenceConverterSPI
context
- a ReferenceContext to use, if required, during construction of
the new external referenceValueToReferenceConversionException
- if any problem occurs during the conversionCopyright © 2015–2016 The Apache Software Foundation. All rights reserved.