com.citrix.netscaler.nitro.resource.config.db.dbdbprofile 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.db;
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 dbdbprofile_response extends base_response
{
public dbdbprofile[] dbdbprofile;
}
/**
* Configuration for DB profile resource.
*/
public class dbdbprofile extends base_resource
{
private String name;
private String interpretquery;
private String stickiness;
private String kcdaccount;
private String conmultiplex;
//------- Read only Parameter ---------;
private Long refcnt;
private Long __count;
/**
*
* Name of the DB profile.
Minimum length = 1
Maximum length = 127
*
*/
public void set_name(String name) throws Exception{
this.name = name;
}
/**
*
* Name of the DB profile.
Minimum length = 1
Maximum length = 127
*
*/
public String get_name() throws Exception {
return this.name;
}
/**
*
* Enables/Disables Interpret Query.
Default value: YES
Possible values = YES, NO
*
*/
public void set_interpretquery(String interpretquery) throws Exception{
this.interpretquery = interpretquery;
}
/**
*
* Enables/Disables Interpret Query.
Default value: YES
Possible values = YES, NO
*
*/
public String get_interpretquery() throws Exception {
return this.interpretquery;
}
/**
*
* Enables/Disables Stickyness of Query.
Default value: NO
Possible values = YES, NO
*
*/
public void set_stickiness(String stickiness) throws Exception{
this.stickiness = stickiness;
}
/**
*
* Enables/Disables Stickyness of Query.
Default value: NO
Possible values = YES, NO
*
*/
public String get_stickiness() throws Exception {
return this.stickiness;
}
/**
*
* Enables/Disables KCD account.
Minimum length = 1
Maximum length = 127
*
*/
public void set_kcdaccount(String kcdaccount) throws Exception{
this.kcdaccount = kcdaccount;
}
/**
*
* Enables/Disables KCD account.
Minimum length = 1
Maximum length = 127
*
*/
public String get_kcdaccount() throws Exception {
return this.kcdaccount;
}
/**
*
* Reuse server connections for requests from more than one client connections.
Default value: ENABLED
Possible values = ENABLED, DISABLED
*
*/
public void set_conmultiplex(String conmultiplex) throws Exception{
this.conmultiplex = conmultiplex;
}
/**
*
* Reuse server connections for requests from more than one client connections.
Default value: ENABLED
Possible values = ENABLED, DISABLED
*
*/
public String get_conmultiplex() throws Exception {
return this.conmultiplex;
}
/**
*
* Profile Reference Count.
*
*/
public Long get_refcnt() throws Exception {
return this.refcnt;
}
/**
*
* 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{
dbdbprofile_response result = (dbdbprofile_response) service.get_payload_formatter().string_to_resource(dbdbprofile_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.dbdbprofile;
}
/**
*
* Returns the value of object identifier argument
*
*/
protected String get_object_name() {
return this.name;
}
/**
* Use this API to add dbdbprofile.
*/
public static base_response add(nitro_service client, dbdbprofile resource) throws Exception {
dbdbprofile addresource = new dbdbprofile();
addresource.name = resource.name;
addresource.interpretquery = resource.interpretquery;
addresource.stickiness = resource.stickiness;
addresource.kcdaccount = resource.kcdaccount;
addresource.conmultiplex = resource.conmultiplex;
return addresource.add_resource(client);
}
/**
* Use this API to add dbdbprofile resources.
*/
public static base_responses add(nitro_service client, dbdbprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dbdbprofile addresources[] = new dbdbprofile[resources.length];
for (int i=0;i 0) {
dbdbprofile deleteresources[] = new dbdbprofile[name.length];
for (int i=0;i 0) {
dbdbprofile deleteresources[] = new dbdbprofile[resources.length];
for (int i=0;i 0) {
dbdbprofile updateresources[] = new dbdbprofile[resources.length];
for (int i=0;i 0) {
dbdbprofile unsetresources[] = new dbdbprofile[name.length];
for (int i=0;i 0) {
dbdbprofile unsetresources[] = new dbdbprofile[resources.length];
for (int i=0;i0) {
dbdbprofile response[] = new dbdbprofile[name.length];
dbdbprofile obj[] = new dbdbprofile[name.length];
for (int i=0;i