Package org.apache.nifi.web
Interface ViewableContent
public interface ViewableContent
Interface for obtaining content from the NiFi content repository.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription
-
Field Details
-
CONTENT_REQUEST_ATTRIBUTE
- See Also:
-
-
Method Details
-
getContentStream
InputStream getContentStream()- Returns:
- stream to the viewable content. The data stream can only be read once so an extension can call this method or getContent
-
getContent
- Returns:
- the content as a string. The data stream can only be read once so an extension can call this method or getContentStream
- Throws:
IOException
- if unable to read content
-
getDisplayMode
ViewableContent.DisplayMode getDisplayMode()- Returns:
- the desired display mode. If the mode is Hex the framework will handle generating the mark up. The only values that an extension will see is Original or Formatted
-
getFileName
String getFileName()- Returns:
- contents file name
-
getContentType
String getContentType()- Returns:
- mime type of the content, value is lowercase and stripped of all parameters if there were any
-
getRawContentType
String getRawContentType()- Returns:
- unchanged mime type of the content
-