Class SystemPropertiesCliResource
- java.lang.Object
-
- org.glassfish.admin.rest.resources.AbstractResource
-
- org.glassfish.admin.rest.resources.TemplateExecCommand
-
- org.glassfish.admin.rest.resources.custom.SystemPropertiesCliResource
-
- All Implemented Interfaces:
OptionsCapable
@Produces({"text/html","application/json","application/xml","application/x-www-form-urlencoded"}) @Consumes({"application/json","application/xml","application/x-www-form-urlencoded"}) @CommandLock(NONE) @ExecuteOn(DAS) @TargetType({CLUSTER,CLUSTERED_INSTANCE,CONFIG,DAS,DOMAIN,STANDALONE_INSTANCE}) public class SystemPropertiesCliResource extends TemplateExecCommand
- Author:
- jasonlee
-
-
Field Summary
Fields Modifier and Type Field Description protected Domain
domain
protected Dom
entity
protected org.glassfish.hk2.api.ServiceLocator
injector
protected static String
TAG_SYSTEM_PROPERTY
-
Fields inherited from class org.glassfish.admin.rest.resources.TemplateExecCommand
commandAction, commandDisplayName, commandMethod, commandName, ERROR, ERROR_DEFAULT_MESSAGE, ERROR_STRING, isLinkedToParent, localStrings, resourceName
-
Fields inherited from class org.glassfish.admin.rest.resources.AbstractResource
locatorBridge, logger, requestHeaders, securityContext, serviceLocator, subjectRef, uriInfo
-
-
Constructor Summary
Constructors Constructor Description SystemPropertiesCliResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
convertPropertyMapToString(Map<String,String> data)
jakarta.ws.rs.core.Response
create(Map<String,String> data)
protected jakarta.ws.rs.core.Response
createProperties(String parent, Map<String,String> data)
Create some system properties using the create-system-properties asadmin command.protected jakarta.ws.rs.core.Response
deleteProperties(String parent, Collection<String> propNames)
Delete some system properties using the delete-system-property asadmin command and aggregating the results.protected jakarta.ws.rs.core.Response
deleteProperty(String parent, String propName)
Delete a system property using the delete-system-property asadmin command.jakarta.ws.rs.core.Response
deleteSystemProperty(String id, HashMap<String,String> data)
ActionReportResult
get()
protected Dom
getCluster(Dom domain, String clusterName)
protected Dom
getConfig(Dom domain, String configName)
Dom
getEntity()
protected void
getSystemProperties(Map<String,Map<String,String>> properties, Dom dom, boolean getDefaults)
jakarta.ws.rs.core.Response
getSystemPropertyResource(String id, Map<String,String> data)
protected jakarta.ws.rs.core.Response
saveProperties(String parent, Map<String,String> data)
Saves the passed map of system properties.protected jakarta.ws.rs.core.Response
saveProperties(Map<String,String> data)
Saves the passed map of system properties.void
setEntity(Dom p)
jakarta.ws.rs.core.Response
update(Map<String,String> data)
-
Methods inherited from class org.glassfish.admin.rest.resources.TemplateExecCommand
addQueryString, adjustParameters, executeCommand, executeCommandAsSse, executeCommandLegacyFormat, getCommandParams, getParent, getUriInfo, options, optionsLegacyFormat, processCommandParams, purgeEmptyEntries, renameParameter, setUriInfo
-
Methods inherited from class org.glassfish.admin.rest.resources.AbstractResource
getAuthenticatedUser, getSubject
-
-
-
-
Field Detail
-
TAG_SYSTEM_PROPERTY
protected static final String TAG_SYSTEM_PROPERTY
- See Also:
- Constant Field Values
-
injector
@Context protected org.glassfish.hk2.api.ServiceLocator injector
-
entity
protected Dom entity
-
domain
protected Domain domain
-
-
Method Detail
-
setEntity
public void setEntity(Dom p)
-
getEntity
public Dom getEntity()
-
get
@GET public ActionReportResult get()
-
getSystemPropertyResource
@Path("{Name}/") @POST public jakarta.ws.rs.core.Response getSystemPropertyResource(@PathParam("Name") String id, Map<String,String> data)
-
deleteSystemProperty
@Path("{Name}/") @DELETE public jakarta.ws.rs.core.Response deleteSystemProperty(@PathParam("Name") String id, HashMap<String,String> data)
-
getSystemProperties
protected void getSystemProperties(Map<String,Map<String,String>> properties, Dom dom, boolean getDefaults)
-
saveProperties
protected jakarta.ws.rs.core.Response saveProperties(Map<String,String> data)
Saves the passed map of system properties. Any entry with a null or empty value will be deleted with the delete-system-property command, and the rest will then be created with create-system-properties.- Parameters:
data
- a map of properties to create or delete- Returns:
- the result of the command
-
saveProperties
protected jakarta.ws.rs.core.Response saveProperties(String parent, Map<String,String> data)
Saves the passed map of system properties. Any entry with a null or empty value will be deleted with the delete-system-property command, and the rest will then be created with create-system-properties.- Parameters:
parent
- the name of the parent object of the targetdata
- a map of properties to create or delete- Returns:
- the result of the command
-
createProperties
protected jakarta.ws.rs.core.Response createProperties(String parent, Map<String,String> data)
Create some system properties using the create-system-properties asadmin command.- Parameters:
parent
- the name of the parent object of the targetdata
- a map of properties to create- Returns:
- the result of the command
-
deleteProperties
protected jakarta.ws.rs.core.Response deleteProperties(String parent, Collection<String> propNames)
Delete some system properties using the delete-system-property asadmin command and aggregating the results.- Parameters:
parent
- the name of the parent object of the targetpropNames
- the names of the properties to delete- Returns:
- the result of the commands
-
deleteProperty
protected jakarta.ws.rs.core.Response deleteProperty(String parent, String propName)
Delete a system property using the delete-system-property asadmin command.- Parameters:
parent
- the name of the parent object of the targetpropName
- the name of the property to delete- Returns:
- the result of the command
-
-