com.citrix.netscaler.nitro.resource.config.authentication.authenticationcertpolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nitro Show documentation
Show all versions of nitro Show documentation
The Citrix® NetScaler® NITRO client for Java allows you to configure and monitor the NetScaler appliance programmatically in Java based applications. Source code taken from Build 121 of NetScaler release 10.1
The newest version!
/*
* Copyright (c) 2008-2015 Citrix Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.citrix.netscaler.nitro.resource.config.authentication;
import com.citrix.netscaler.nitro.resource.base.*;
import com.citrix.netscaler.nitro.service.nitro_service;
import com.citrix.netscaler.nitro.service.options;
import com.citrix.netscaler.nitro.util.*;
import com.citrix.netscaler.nitro.exception.nitro_exception;
class authenticationcertpolicy_response extends base_response
{
public authenticationcertpolicy[] authenticationcertpolicy;
}
/**
* Configuration for CERT policy resource.
*/
public class authenticationcertpolicy extends base_resource
{
private String name;
private String rule;
private String reqaction;
private Long __count;
/**
*
* Name for the client certificate authentication policy.
Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after cert authentication policy is created.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, ?my authentication policy? or ?my authentication policy?).
Minimum length = 1
*
*/
public void set_name(String name) throws Exception{
this.name = name;
}
/**
*
* Name for the client certificate authentication policy.
Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Cannot be changed after cert authentication policy is created.
The following requirement applies only to the NetScaler CLI:
If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, ?my authentication policy? or ?my authentication policy?).
Minimum length = 1
*
*/
public String get_name() throws Exception {
return this.name;
}
/**
*
* Name of the NetScaler named rule, or a default syntax expression, that the policy uses to determine whether to attempt to authenticate the user with the authentication server.
Minimum length = 1
*
*/
public void set_rule(String rule) throws Exception{
this.rule = rule;
}
/**
*
* Name of the NetScaler named rule, or a default syntax expression, that the policy uses to determine whether to attempt to authenticate the user with the authentication server.
Minimum length = 1
*
*/
public String get_rule() throws Exception {
return this.rule;
}
/**
*
* Name of the client cert authentication action to be performed if the policy matches.
Minimum length = 1
*
*/
public void set_reqaction(String reqaction) throws Exception{
this.reqaction = reqaction;
}
/**
*
* Name of the client cert authentication action to be performed if the policy matches.
Minimum length = 1
*
*/
public String get_reqaction() throws Exception {
return this.reqaction;
}
/**
*
* converts nitro response into object and returns the object array in case of get request.
*
*/
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception{
authenticationcertpolicy_response result = (authenticationcertpolicy_response) service.get_payload_formatter().string_to_resource(authenticationcertpolicy_response.class, response);
if(result.errorcode != 0) {
if (result.errorcode == 444) {
service.clear_session();
}
if(result.severity != null)
{
if (result.severity.equals("ERROR"))
throw new nitro_exception(result.message,result.errorcode);
}
else
{
throw new nitro_exception(result.message,result.errorcode);
}
}
return result.authenticationcertpolicy;
}
/**
*
* Returns the value of object identifier argument
*
*/
protected String get_object_name() {
return this.name;
}
/**
* Use this API to add authenticationcertpolicy.
*/
public static base_response add(nitro_service client, authenticationcertpolicy resource) throws Exception {
authenticationcertpolicy addresource = new authenticationcertpolicy();
addresource.name = resource.name;
addresource.rule = resource.rule;
addresource.reqaction = resource.reqaction;
return addresource.add_resource(client);
}
/**
* Use this API to add authenticationcertpolicy resources.
*/
public static base_responses add(nitro_service client, authenticationcertpolicy resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
authenticationcertpolicy addresources[] = new authenticationcertpolicy[resources.length];
for (int i=0;i 0) {
authenticationcertpolicy deleteresources[] = new authenticationcertpolicy[name.length];
for (int i=0;i 0) {
authenticationcertpolicy deleteresources[] = new authenticationcertpolicy[resources.length];
for (int i=0;i 0) {
authenticationcertpolicy updateresources[] = new authenticationcertpolicy[resources.length];
for (int i=0;i 0) {
authenticationcertpolicy unsetresources[] = new authenticationcertpolicy[name.length];
for (int i=0;i 0) {
authenticationcertpolicy unsetresources[] = new authenticationcertpolicy[resources.length];
for (int i=0;i0) {
authenticationcertpolicy response[] = new authenticationcertpolicy[name.length];
authenticationcertpolicy obj[] = new authenticationcertpolicy[name.length];
for (int i=0;i