public class TemplateResource extends ApplicationResource
| Modifier and Type | Field and Description |
|---|---|
private WebClusterManager |
clusterManager |
private static org.slf4j.Logger |
logger |
private NiFiProperties |
properties |
private NiFiServiceFacade |
serviceFacade |
CLIENT_ID, CLUSTER_CONTEXT_HTTP_HEADER, PROXIED_ENTITIES_CHAIN_HTTP_HEADER, PROXIED_ENTITY_USER_DETAILS_HTTP_HEADER, PROXY_CONTEXT_PATH_HTTP_HEADER, PROXY_HOST_HTTP_HEADER, PROXY_PORT_HTTP_HEADER, PROXY_SCHEME_HTTP_HEADER, VERSION| Constructor and Description |
|---|
TemplateResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createTemplate(javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
String name,
String description,
String snippetId)
Creates a new template based off of the specified template.
|
javax.ws.rs.core.Response |
exportTemplate(ClientIdParameter clientId,
String id)
Retrieves the specified template.
|
javax.ws.rs.core.Response |
getTemplates(ClientIdParameter clientId)
Retrieves all the of templates in this NiFi.
|
javax.ws.rs.core.Response |
importTemplate(javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
InputStream in)
Imports the specified template.
|
javax.ws.rs.core.Response |
importTemplate(javax.servlet.http.HttpServletRequest httpServletRequest,
TemplateEntity templateEntity)
Imports the specified template.
|
private TemplateDTO |
populateRemainingTemplateContent(TemplateDTO template)
Populates the uri for the specified template.
|
Set<TemplateDTO> |
populateRemainingTemplatesContent(Set<TemplateDTO> templates)
Populates the uri for the specified templates.
|
javax.ws.rs.core.Response |
removeTemplate(javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
String id)
Removes the specified template.
|
void |
setClusterManager(WebClusterManager clusterManager) |
void |
setProperties(NiFiProperties properties) |
void |
setServiceFacade(NiFiServiceFacade serviceFacade) |
clusterContext, generateContinueResponse, generateCreatedResponse, generateOkResponse, generateOkResponse, generateResourceUri, getAbsolutePath, getClusterContextFromRequest, getHeaders, getHeaders, getRequestParameters, getRequestParameters, noCache, updateClientIdprivate static final org.slf4j.Logger logger
private NiFiServiceFacade serviceFacade
private WebClusterManager clusterManager
private NiFiProperties properties
public Set<TemplateDTO> populateRemainingTemplatesContent(Set<TemplateDTO> templates)
templates - private TemplateDTO populateRemainingTemplateContent(TemplateDTO template)
@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response getTemplates(ClientIdParameter clientId)
clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response createTemplate(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
String name,
String description,
String snippetId)
httpServletRequest - clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.name - The name of the template.description - The description of the template.snippetId - The id of the snippet this template is based on.@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response importTemplate(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
InputStream in)
httpServletRequest - clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.in - The template stream@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response importTemplate(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
TemplateEntity templateEntity)
httpServletRequest - templateEntity - A templateEntity.@PreAuthorize(value="hasAnyRole(\'ROLE_MONITOR\', \'ROLE_DFM\', \'ROLE_ADMIN\')") public javax.ws.rs.core.Response exportTemplate(ClientIdParameter clientId, String id)
clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.id - The id of the template to retrieve@PreAuthorize(value="hasRole(\'ROLE_DFM\')")
public javax.ws.rs.core.Response removeTemplate(@Context
javax.servlet.http.HttpServletRequest httpServletRequest,
ClientIdParameter clientId,
String id)
httpServletRequest - clientId - Optional client id. If the client id is not specified, a
new one will be generated. This value (whether specified or generated) is
included in the response.id - The id of the template to remove.public void setServiceFacade(NiFiServiceFacade serviceFacade)
public void setClusterManager(WebClusterManager clusterManager)
public void setProperties(NiFiProperties properties)
Copyright © 2015 Apache NiFi (incubating). All rights reserved.