public final class PolicyExport extends AuthenticatedCommand
ssoToken
Modifier | Constructor and Description |
---|---|
protected |
PolicyExport(org.forgerock.http.Client client)
Constructs a new json resource command.
|
Modifier and Type | Method and Description |
---|---|
void |
handleRequest(RequestContext request)
Authenticates the administrator.
|
void |
handleResourceRequest(RequestContext request)
Handles the passed request.
|
protected String |
objectToJsonString(Object object)
Given an object, converts it to a well formatted json representation.
|
protected org.forgerock.json.JsonValue |
readJsonFile(String jsonFile)
Reads in a json file.
|
protected org.forgerock.http.protocol.Response |
sendRequest(org.forgerock.http.protocol.Request request,
String endpoint)
Sends the given request to the passed endpoint.
|
protected void |
writeJsonFile(org.forgerock.json.JsonValue jsonValue,
String jsonFile)
Writes out json to file.
|
getAdminID, getAdminPassword, getAdminSSOToken, ldapLogin, processFileAttributes, writeLog
debugError, debugError, debugMessage, debugWarning, getCommandManager, getOutputWriter, getResourceString, getStringOptionValue, getStringOptionValue, isOptionSet, isVerbose, tokenize
@Inject protected PolicyExport(org.forgerock.http.Client client)
client
- the http clientpublic void handleResourceRequest(RequestContext request) throws CLIException
request
- the command requestCLIException
- should some error occurpublic final void handleRequest(RequestContext request) throws CLIException
AuthenticatedCommand
handleRequest(RequestContext rc)
.
Override this method to get user name and passowrd.handleRequest
in interface CLICommand
handleRequest
in class AuthenticatedCommand
request
- Request Context.CLIException
- if authentication fails.protected final org.forgerock.http.protocol.Response sendRequest(org.forgerock.http.protocol.Request request, String endpoint) throws CLIException
request
- http requestendpoint
- endpointCLIException
- should some error occurprotected final org.forgerock.json.JsonValue readJsonFile(String jsonFile) throws CLIException
jsonFile
- the path to the json fileCLIException
- should some error occurprotected final void writeJsonFile(org.forgerock.json.JsonValue jsonValue, String jsonFile) throws CLIException
jsonValue
- the json to be written outjsonFile
- the path to the json fileCLIException
- should some error occurprotected final String objectToJsonString(Object object) throws CLIException
object
- objectCLIException
- should some error occur during the transformation to jsonCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.