Package fiftyone.pipeline.web.services
Class FiftyOneJSServiceCore.Default
- java.lang.Object
-
- fiftyone.pipeline.web.services.FiftyOneJSServiceCore.Default
-
- All Implemented Interfaces:
FiftyOneJSServiceCore
- Enclosing interface:
- FiftyOneJSServiceCore
public static class FiftyOneJSServiceCore.Default extends Object implements FiftyOneJSServiceCore
Default implementation of theFiftyOneJSServiceCoreservice.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface fiftyone.pipeline.web.services.FiftyOneJSServiceCore
FiftyOneJSServiceCore.Default
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientsidePropertyServiceCoreclientsidePropertyServiceCoreprotected booleanenabled
-
Constructor Summary
Constructors Constructor Description Default(ClientsidePropertyServiceCore clientsidePropertyServiceCore, boolean enabled)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanserveJS(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Check if the 51Degrees JavaScript is being requested and write it to the response if it is.booleanserveJson(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Check if the 51Degrees JSON is being requested and write it to the response if it is
-
-
-
Field Detail
-
clientsidePropertyServiceCore
protected final ClientsidePropertyServiceCore clientsidePropertyServiceCore
-
enabled
protected boolean enabled
-
-
Constructor Detail
-
Default
public Default(ClientsidePropertyServiceCore clientsidePropertyServiceCore, boolean enabled)
Construct a new instance.- Parameters:
clientsidePropertyServiceCore- used to get the JavaScript to add to the returned fileenabled- true if the service should be enabled
-
-
Method Detail
-
serveJS
public boolean serveJS(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOExceptionDescription copied from interface:FiftyOneJSServiceCoreCheck if the 51Degrees JavaScript is being requested and write it to the response if it is.- Specified by:
serveJSin interfaceFiftyOneJSServiceCore- Parameters:
request- theHttpServletRequestto get theFlowDatafromresponse- theHttpServletResponseto write the JavaScript to- Returns:
- true if JavaScript was written to the response, false otherwise
- Throws:
IOException- if there was a failure reading or writing to the request or response
-
serveJson
public boolean serveJson(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOExceptionDescription copied from interface:FiftyOneJSServiceCoreCheck if the 51Degrees JSON is being requested and write it to the response if it is- Specified by:
serveJsonin interfaceFiftyOneJSServiceCore- Parameters:
request- theHttpServletRequestto get theFlowDatafromresponse- theHttpServletResponseto write the JSON to- Returns:
- true if JSON was written to the response, false otherwise
- Throws:
IOException- if there was a failure reading or writing to the request or response
-
-