code
stringlengths 73
34.1k
| label
stringclasses 1
value |
---|---|
public static HashMap<String, MtasConfiguration> readMtasCharFilterConfigurations(
ResourceLoader resourceLoader, String configFile) throws IOException {
HashMap<String, HashMap<String, String>> configs = readConfigurations(
resourceLoader, configFile, MtasCharFilterFactory.class.getName());
if (configs == null) {
throw new IOException("no configurations");
} else {
HashMap<String, MtasConfiguration> result = new HashMap<String, MtasConfiguration>();
for (Entry<String, HashMap<String, String>> entry : configs.entrySet()) {
HashMap<String, String> config = entry.getValue();
if (config.containsKey(CHARFILTER_CONFIGURATION_TYPE)) {
MtasConfiguration item = new MtasConfiguration();
item.attributes.put(CHARFILTER_CONFIGURATION_TYPE,
config.get(CHARFILTER_CONFIGURATION_TYPE));
item.attributes.put(CHARFILTER_CONFIGURATION_PREFIX,
config.get(CHARFILTER_CONFIGURATION_PREFIX));
item.attributes.put(CHARFILTER_CONFIGURATION_POSTFIX,
config.get(CHARFILTER_CONFIGURATION_POSTFIX));
result.put(entry.getKey(), item);
} else {
throw new IOException("configuration " + entry.getKey() + " has no "
+ CHARFILTER_CONFIGURATION_TYPE);
}
}
return result;
}
} | java |
public static HashMap<String, MtasConfiguration> readMtasTokenizerConfigurations(
ResourceLoader resourceLoader, String configFile) throws IOException {
HashMap<String, HashMap<String, String>> configs = readConfigurations(
resourceLoader, configFile, MtasTokenizerFactory.class.getName());
if (configs == null) {
throw new IOException("no configurations");
} else {
HashMap<String, MtasConfiguration> result = new HashMap<String, MtasConfiguration>();
for (Entry<String, HashMap<String, String>> entry : configs.entrySet()) {
HashMap<String, String> config = entry.getValue();
if (config.containsKey(TOKENIZER_CONFIGURATION_FILE)) {
result.put(entry.getKey(), readConfiguration(resourceLoader
.openResource(config.get(TOKENIZER_CONFIGURATION_FILE))));
} else {
throw new IOException("configuration " + entry.getKey() + " has no "
+ TOKENIZER_CONFIGURATION_FILE);
}
}
return result;
}
} | java |
public static MtasConfiguration readConfiguration(InputStream reader)
throws IOException {
MtasConfiguration currentConfig = null;
// parse xml
XMLInputFactory factory = XMLInputFactory.newInstance();
try {
XMLStreamReader streamReader = factory.createXMLStreamReader(reader);
QName qname;
try {
int event = streamReader.getEventType();
while (true) {
switch (event) {
case XMLStreamConstants.START_DOCUMENT:
if (!streamReader.getCharacterEncodingScheme().equals("UTF-8")) {
throw new IOException("XML not UTF-8 encoded");
}
break;
case XMLStreamConstants.END_DOCUMENT:
case XMLStreamConstants.SPACE:
break;
case XMLStreamConstants.START_ELEMENT:
// get data
qname = streamReader.getName();
if (currentConfig == null) {
if (qname.getLocalPart().equals("mtas")) {
currentConfig = new MtasConfiguration();
} else {
throw new IOException("no Mtas Configuration");
}
} else {
MtasConfiguration parentConfig = currentConfig;
currentConfig = new MtasConfiguration();
parentConfig.children.add(currentConfig);
currentConfig.parent = parentConfig;
currentConfig.name = qname.getLocalPart();
for (int i = 0; i < streamReader.getAttributeCount(); i++) {
currentConfig.attributes.put(
streamReader.getAttributeLocalName(i),
streamReader.getAttributeValue(i));
}
}
break;
case XMLStreamConstants.END_ELEMENT:
if (currentConfig.parent == null) {
return currentConfig;
} else {
currentConfig = currentConfig.parent;
}
break;
case XMLStreamConstants.CHARACTERS:
break;
}
if (!streamReader.hasNext()) {
break;
}
event = streamReader.next();
}
} finally {
streamReader.close();
}
} catch (XMLStreamException e) {
log.debug(e);
}
return null;
} | java |
public static systemcpu_stats[] get(nitro_service service) throws Exception{
systemcpu_stats obj = new systemcpu_stats();
systemcpu_stats[] response = (systemcpu_stats[])obj.stat_resources(service);
return response;
} | java |
public static systemcpu_stats get(nitro_service service, Long id) throws Exception{
systemcpu_stats obj = new systemcpu_stats();
obj.set_id(id);
systemcpu_stats response = (systemcpu_stats) obj.stat_resource(service);
return response;
} | java |
final public TregexPattern Root() throws ParseException {
TregexPattern node;
node = SubNode(Relation.ROOT);
jj_consume_token(11);
{if (true) return node;}
throw new Error("Missing return statement in function");
} | java |
final public TregexPattern Node(Relation r) throws ParseException {
TregexPattern node;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case 12:
jj_consume_token(12);
node = SubNode(r);
jj_consume_token(13);
break;
case IDENTIFIER:
case BLANK:
case REGEX:
case 14:
case 15:
case 18:
case 19:
node = ModDescription(r);
break;
default:
jj_la1[0] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
{if (true) return node;}
throw new Error("Missing return statement in function");
} | java |
public ParseException generateParseException() {
jj_expentries.clear();
boolean[] la1tokens = new boolean[25];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
}
for (int i = 0; i < 23; i++) {
if (jj_la1[i] == jj_gen) {
for (int j = 0; j < 32; j++) {
if ((jj_la1_0[i] & (1<<j)) != 0) {
la1tokens[j] = true;
}
}
}
}
for (int i = 0; i < 25; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
jj_expentries.add(jj_expentry);
}
}
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
exptokseq[i] = jj_expentries.get(i);
}
return new ParseException(token, exptokseq, tokenImage);
} | java |
public static base_response sync(nitro_service client, hafiles resource) throws Exception {
hafiles syncresource = new hafiles();
syncresource.mode = resource.mode;
return syncresource.perform_operation(client,"sync");
} | java |
public static base_response clear(nitro_service client, lbpersistentsessions resource) throws Exception {
lbpersistentsessions clearresource = new lbpersistentsessions();
clearresource.vserver = resource.vserver;
clearresource.persistenceparameter = resource.persistenceparameter;
return clearresource.perform_operation(client,"clear");
} | java |
public static base_responses clear(nitro_service client, lbpersistentsessions resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbpersistentsessions clearresources[] = new lbpersistentsessions[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new lbpersistentsessions();
clearresources[i].vserver = resources[i].vserver;
clearresources[i].persistenceparameter = resources[i].persistenceparameter;
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | java |
public static lbpersistentsessions[] get(nitro_service service, options option) throws Exception{
lbpersistentsessions obj = new lbpersistentsessions();
lbpersistentsessions[] response = (lbpersistentsessions[])obj.get_resources(service,option);
return response;
} | java |
public static lbpersistentsessions[] get(nitro_service service, lbpersistentsessions_args args) throws Exception{
lbpersistentsessions obj = new lbpersistentsessions();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
lbpersistentsessions[] response = (lbpersistentsessions[])obj.get_resources(service, option);
return response;
} | java |
public static vpnvserver_staserver_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_staserver_binding obj = new vpnvserver_staserver_binding();
obj.set_name(name);
vpnvserver_staserver_binding response[] = (vpnvserver_staserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static appfwprofile_trustedlearningclients_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_trustedlearningclients_binding obj = new appfwprofile_trustedlearningclients_binding();
obj.set_name(name);
appfwprofile_trustedlearningclients_binding response[] = (appfwprofile_trustedlearningclients_binding[]) obj.get_resources(service);
return response;
} | java |
public static void run(ProcessBuilder builder, Writer output, Writer error) {
try {
Process process = builder.start();
consume(process, output, error);
int result = process.waitFor();
if (result != 0) {
String msg = "process %s exited with value %d";
throw new ProcessException(String.format(msg, builder.command(), result));
}
} catch (InterruptedException e) {
throw new ProcessException(e);
} catch (IOException e) {
throw new ProcessException(e);
}
} | java |
private static void consume(Process process, Writer outputWriter, Writer errorWriter)
throws IOException, InterruptedException {
if (outputWriter == null) {
outputWriter = new OutputStreamWriter(System.out);
}
if (errorWriter == null) {
errorWriter = new OutputStreamWriter(System.err);
}
WriterThread outputThread = new WriterThread(process.getInputStream(), outputWriter);
WriterThread errorThread = new WriterThread(process.getErrorStream(), errorWriter);
outputThread.start();
errorThread.start();
outputThread.join();
errorThread.join();
} | java |
public static int getPID() throws IOException {
// note that we ask Perl for "ppid" -- process ID of parent -- that's us
String[] cmd =
new String[] {"perl", "-e", "print getppid() . \"\\n\";"};
StringBuilder out = new StringBuilder();
runShellCommand(cmd, out);
return Integer.parseInt(out.toString());
} | java |
public static appqoe_stats get(nitro_service service) throws Exception{
appqoe_stats obj = new appqoe_stats();
appqoe_stats[] response = (appqoe_stats[])obj.stat_resources(service);
return response[0];
} | java |
public static transformpolicy_binding get(nitro_service service, String name) throws Exception{
transformpolicy_binding obj = new transformpolicy_binding();
obj.set_name(name);
transformpolicy_binding response = (transformpolicy_binding) obj.get_resource(service);
return response;
} | java |
public static gslbvserver_binding get(nitro_service service, String name) throws Exception{
gslbvserver_binding obj = new gslbvserver_binding();
obj.set_name(name);
gslbvserver_binding response = (gslbvserver_binding) obj.get_resource(service);
return response;
} | java |
public static aaauser_vpnsessionpolicy_binding[] get(nitro_service service, String username) throws Exception{
aaauser_vpnsessionpolicy_binding obj = new aaauser_vpnsessionpolicy_binding();
obj.set_username(username);
aaauser_vpnsessionpolicy_binding response[] = (aaauser_vpnsessionpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static tmtrafficpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
tmtrafficpolicy_csvserver_binding obj = new tmtrafficpolicy_csvserver_binding();
obj.set_name(name);
tmtrafficpolicy_csvserver_binding response[] = (tmtrafficpolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static vpnclientlessaccesspolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
vpnclientlessaccesspolicy_vpnglobal_binding obj = new vpnclientlessaccesspolicy_vpnglobal_binding();
obj.set_name(name);
vpnclientlessaccesspolicy_vpnglobal_binding response[] = (vpnclientlessaccesspolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java |
public int numCorrect(int recall) {
int correct = 0;
for (int j = scores.length - 1; j >= scores.length - recall; j--) {
if (isCorrect[j]) {
correct++;
}
}
return correct;
} | java |
public static tmsessionpolicy_aaagroup_binding[] get(nitro_service service, String name) throws Exception{
tmsessionpolicy_aaagroup_binding obj = new tmsessionpolicy_aaagroup_binding();
obj.set_name(name);
tmsessionpolicy_aaagroup_binding response[] = (tmsessionpolicy_aaagroup_binding[]) obj.get_resources(service);
return response;
} | java |
protected String cleanUpLabel(String label) {
if (label == null) {
return ""; // This shouldn't really happen, but can happen if there are unlabeled nodes further down a tree, as apparently happens in at least the 20100730 era American National Corpus
}
boolean nptemp = NPTmpPattern.matcher(label).matches();
boolean npadv = NPAdvPattern.matcher(label).matches();
label = tlp.basicCategory(label);
if (nptemp) {
label = label + "-TMP";
} else if (npadv) {
label = label + "-ADV";
}
return label;
} | java |
public double computeProb(InfoTemplate temp){
return computeProb(temp.wname,temp.wacronym,temp.cname,temp.cacronym,
temp.whomepage, temp.chomepage);
} | java |
public static authenticationlocalpolicy_vpnglobal_binding[] get(nitro_service service, String name) throws Exception{
authenticationlocalpolicy_vpnglobal_binding obj = new authenticationlocalpolicy_vpnglobal_binding();
obj.set_name(name);
authenticationlocalpolicy_vpnglobal_binding response[] = (authenticationlocalpolicy_vpnglobal_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response update(nitro_service client, ptp resource) throws Exception {
ptp updateresource = new ptp();
updateresource.state = resource.state;
return updateresource.update_resource(client);
} | java |
public static ptp get(nitro_service service) throws Exception{
ptp obj = new ptp();
ptp[] response = (ptp[])obj.get_resources(service);
return response[0];
} | java |
public static base_response update(nitro_service client, nsratecontrol resource) throws Exception {
nsratecontrol updateresource = new nsratecontrol();
updateresource.tcpthreshold = resource.tcpthreshold;
updateresource.udpthreshold = resource.udpthreshold;
updateresource.icmpthreshold = resource.icmpthreshold;
updateresource.tcprstthreshold = resource.tcprstthreshold;
return updateresource.update_resource(client);
} | java |
public static base_response unset(nitro_service client, nsratecontrol resource, String[] args) throws Exception{
nsratecontrol unsetresource = new nsratecontrol();
return unsetresource.unset_resource(client,args);
} | java |
public static nsratecontrol get(nitro_service service, options option) throws Exception{
nsratecontrol obj = new nsratecontrol();
nsratecontrol[] response = (nsratecontrol[])obj.get_resources(service,option);
return response[0];
} | java |
public static vpnglobal_sharefileserver_binding[] get(nitro_service service) throws Exception{
vpnglobal_sharefileserver_binding obj = new vpnglobal_sharefileserver_binding();
vpnglobal_sharefileserver_binding response[] = (vpnglobal_sharefileserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response update(nitro_service client, appflowparam resource) throws Exception {
appflowparam updateresource = new appflowparam();
updateresource.templaterefresh = resource.templaterefresh;
updateresource.appnamerefresh = resource.appnamerefresh;
updateresource.flowrecordinterval = resource.flowrecordinterval;
updateresource.udppmtu = resource.udppmtu;
updateresource.httpurl = resource.httpurl;
updateresource.aaausername = resource.aaausername;
updateresource.httpcookie = resource.httpcookie;
updateresource.httpreferer = resource.httpreferer;
updateresource.httpmethod = resource.httpmethod;
updateresource.httphost = resource.httphost;
updateresource.httpuseragent = resource.httpuseragent;
updateresource.clienttrafficonly = resource.clienttrafficonly;
updateresource.httpcontenttype = resource.httpcontenttype;
updateresource.httpauthorization = resource.httpauthorization;
updateresource.httpvia = resource.httpvia;
updateresource.httpxforwardedfor = resource.httpxforwardedfor;
updateresource.httplocation = resource.httplocation;
updateresource.httpsetcookie = resource.httpsetcookie;
updateresource.httpsetcookie2 = resource.httpsetcookie2;
updateresource.connectionchaining = resource.connectionchaining;
return updateresource.update_resource(client);
} | java |
public static base_response unset(nitro_service client, appflowparam resource, String[] args) throws Exception{
appflowparam unsetresource = new appflowparam();
return unsetresource.unset_resource(client,args);
} | java |
public static appflowparam get(nitro_service service) throws Exception{
appflowparam obj = new appflowparam();
appflowparam[] response = (appflowparam[])obj.get_resources(service);
return response[0];
} | java |
public boolean removeAll(AbstractBooleanList other) {
// overridden for performance only.
if (! (other instanceof BooleanArrayList)) return super.removeAll(other);
/* There are two possibilities to do the thing
a) use other.indexOf(...)
b) sort other, then use other.binarySearch(...)
Let's try to figure out which one is faster. Let M=size, N=other.size, then
a) takes O(M*N) steps
b) takes O(N*logN + M*logN) steps (sorting is O(N*logN) and binarySearch is O(logN))
Hence, if N*logN + M*logN < M*N, we use b) otherwise we use a).
*/
if (other.size()==0) {return false;} //nothing to do
int limit = other.size()-1;
int j=0;
boolean[] theElements = elements;
int mySize = size();
double N=(double) other.size();
double M=(double) mySize;
if ( (N+M)*cern.colt.Math.log2(N) < M*N ) {
// it is faster to sort other before searching in it
BooleanArrayList sortedList = (BooleanArrayList) other.clone();
sortedList.quickSort();
for (int i=0; i<mySize ; i++) {
if (sortedList.binarySearchFromTo(theElements[i], 0, limit) < 0) theElements[j++]=theElements[i];
}
}
else {
// it is faster to search in other without sorting
for (int i=0; i<mySize ; i++) {
if (other.indexOfFromTo(theElements[i], 0, limit) < 0) theElements[j++]=theElements[i];
}
}
boolean modified = (j!=mySize);
setSize(j);
return modified;
} | java |
public static configobjects get(nitro_service service) throws Exception{
configobjects obj = new configobjects();
configobjects[] response = (configobjects[])obj.get_resources(service);
return response[0];
} | java |
public static authorizationpolicylabel_authorizationpolicy_binding[] get(nitro_service service, String labelname) throws Exception{
authorizationpolicylabel_authorizationpolicy_binding obj = new authorizationpolicylabel_authorizationpolicy_binding();
obj.set_labelname(labelname);
authorizationpolicylabel_authorizationpolicy_binding response[] = (authorizationpolicylabel_authorizationpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static authenticationvserver_auditsyslogpolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_auditsyslogpolicy_binding obj = new authenticationvserver_auditsyslogpolicy_binding();
obj.set_name(name);
authenticationvserver_auditsyslogpolicy_binding response[] = (authenticationvserver_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static gslbvserver_gslbservice_binding[] get(nitro_service service, String name) throws Exception{
gslbvserver_gslbservice_binding obj = new gslbvserver_gslbservice_binding();
obj.set_name(name);
gslbvserver_gslbservice_binding response[] = (gslbvserver_gslbservice_binding[]) obj.get_resources(service);
return response;
} | java |
public static rewriteglobal_rewritepolicy_binding[] get(nitro_service service) throws Exception{
rewriteglobal_rewritepolicy_binding obj = new rewriteglobal_rewritepolicy_binding();
rewriteglobal_rewritepolicy_binding response[] = (rewriteglobal_rewritepolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static void log(RedwoodChannels channels, Object obj) {
log(channels, obj.getClass().getSimpleName(), obj);
} | java |
public static base_response add(nitro_service client, arp resource) throws Exception {
arp addresource = new arp();
addresource.ipaddress = resource.ipaddress;
addresource.td = resource.td;
addresource.mac = resource.mac;
addresource.ifnum = resource.ifnum;
addresource.ownernode = resource.ownernode;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, arp resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
arp addresources[] = new arp[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new arp();
addresources[i].ipaddress = resources[i].ipaddress;
addresources[i].td = resources[i].td;
addresources[i].mac = resources[i].mac;
addresources[i].ifnum = resources[i].ifnum;
addresources[i].ownernode = resources[i].ownernode;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response delete(nitro_service client, arp resource) throws Exception {
arp deleteresource = new arp();
deleteresource.ipaddress = resource.ipaddress;
deleteresource.td = resource.td;
deleteresource.all = resource.all;
deleteresource.ownernode = resource.ownernode;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, arp resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
arp deleteresources[] = new arp[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new arp();
deleteresources[i].ipaddress = resources[i].ipaddress;
deleteresources[i].td = resources[i].td;
deleteresources[i].all = resources[i].all;
deleteresources[i].ownernode = resources[i].ownernode;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java |
public static base_response send(nitro_service client, arp resource) throws Exception {
arp sendresource = new arp();
sendresource.ipaddress = resource.ipaddress;
sendresource.td = resource.td;
sendresource.all = resource.all;
return sendresource.perform_operation(client,"send");
} | java |
public static base_responses send(nitro_service client, arp resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
arp sendresources[] = new arp[resources.length];
for (int i=0;i<resources.length;i++){
sendresources[i] = new arp();
sendresources[i].ipaddress = resources[i].ipaddress;
sendresources[i].td = resources[i].td;
sendresources[i].all = resources[i].all;
}
result = perform_operation_bulk_request(client, sendresources,"send");
}
return result;
} | java |
public static arp[] get(nitro_service service) throws Exception{
arp obj = new arp();
arp[] response = (arp[])obj.get_resources(service);
return response;
} | java |
public static sslpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
sslpolicy_csvserver_binding obj = new sslpolicy_csvserver_binding();
obj.set_name(name);
sslpolicy_csvserver_binding response[] = (sslpolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static vpnvserver_authenticationldappolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_authenticationldappolicy_binding obj = new vpnvserver_authenticationldappolicy_binding();
obj.set_name(name);
vpnvserver_authenticationldappolicy_binding response[] = (vpnvserver_authenticationldappolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response add(nitro_service client, appfwpolicylabel resource) throws Exception {
appfwpolicylabel addresource = new appfwpolicylabel();
addresource.labelname = resource.labelname;
addresource.policylabeltype = resource.policylabeltype;
return addresource.add_resource(client);
} | java |
public static appfwpolicylabel[] get(nitro_service service) throws Exception{
appfwpolicylabel obj = new appfwpolicylabel();
appfwpolicylabel[] response = (appfwpolicylabel[])obj.get_resources(service);
return response;
} | java |
public static appfwpolicylabel get(nitro_service service, String labelname) throws Exception{
appfwpolicylabel obj = new appfwpolicylabel();
obj.set_labelname(labelname);
appfwpolicylabel response = (appfwpolicylabel) obj.get_resource(service);
return response;
} | java |
public boolean compare(List<CoreLabel> doc1, List<CoreLabel> doc2) {
int i1 = 0, i2 = 0; //
String last1 = "O", last2 = "O";
boolean cm_set;
for (int i = 0; i < doc1.size(); i++) {
CoreLabel c1 = doc1.get(i);
CoreLabel c2 = doc2.get(i);
String a1 = c1.getString(AnswerAnnotation.class);
String a2 = c2.getString(AnswerAnnotation.class);
if (a1 == null || a2 == null) return false;
}
// TODO
return true;
} | java |
public static vpnglobal_authenticationldappolicy_binding[] get(nitro_service service) throws Exception{
vpnglobal_authenticationldappolicy_binding obj = new vpnglobal_authenticationldappolicy_binding();
vpnglobal_authenticationldappolicy_binding response[] = (vpnglobal_authenticationldappolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static systemglobal_authenticationtacacspolicy_binding[] get(nitro_service service) throws Exception{
systemglobal_authenticationtacacspolicy_binding obj = new systemglobal_authenticationtacacspolicy_binding();
systemglobal_authenticationtacacspolicy_binding response[] = (systemglobal_authenticationtacacspolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static svcbindings get(nitro_service service, String servicename) throws Exception{
svcbindings obj = new svcbindings();
obj.set_servicename(servicename);
svcbindings response = (svcbindings) obj.get_resource(service);
return response;
} | java |
public static svcbindings[] get(nitro_service service, String servicename[]) throws Exception{
if (servicename !=null && servicename.length>0) {
svcbindings response[] = new svcbindings[servicename.length];
svcbindings obj[] = new svcbindings[servicename.length];
for (int i=0;i<servicename.length;i++) {
obj[i] = new svcbindings();
obj[i].set_servicename(servicename[i]);
response[i] = (svcbindings) obj[i].get_resource(service);
}
return response;
}
return null;
} | java |
public static cachepolicylabel_stats[] get(nitro_service service) throws Exception{
cachepolicylabel_stats obj = new cachepolicylabel_stats();
cachepolicylabel_stats[] response = (cachepolicylabel_stats[])obj.stat_resources(service);
return response;
} | java |
public static cachepolicylabel_stats get(nitro_service service, String labelname) throws Exception{
cachepolicylabel_stats obj = new cachepolicylabel_stats();
obj.set_labelname(labelname);
cachepolicylabel_stats response = (cachepolicylabel_stats) obj.stat_resource(service);
return response;
} | java |
public static systementitytype get(nitro_service service) throws Exception{
systementitytype obj = new systementitytype();
systementitytype[] response = (systementitytype[])obj.get_resources(service);
return response[0];
} | java |
public static systementitytype[] get(nitro_service service, systementitytype_args args) throws Exception{
systementitytype obj = new systementitytype();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
systementitytype[] response = (systementitytype[])obj.get_resources(service, option);
return response;
} | java |
public static spilloverpolicy_binding get(nitro_service service, String name) throws Exception{
spilloverpolicy_binding obj = new spilloverpolicy_binding();
obj.set_name(name);
spilloverpolicy_binding response = (spilloverpolicy_binding) obj.get_resource(service);
return response;
} | java |
public static cspolicy_binding get(nitro_service service, String policyname) throws Exception{
cspolicy_binding obj = new cspolicy_binding();
obj.set_policyname(policyname);
cspolicy_binding response = (cspolicy_binding) obj.get_resource(service);
return response;
} | java |
public static gslbvserver_stats[] get(nitro_service service) throws Exception{
gslbvserver_stats obj = new gslbvserver_stats();
gslbvserver_stats[] response = (gslbvserver_stats[])obj.stat_resources(service);
return response;
} | java |
public static gslbvserver_stats get(nitro_service service, String name) throws Exception{
gslbvserver_stats obj = new gslbvserver_stats();
obj.set_name(name);
gslbvserver_stats response = (gslbvserver_stats) obj.stat_resource(service);
return response;
} | java |
public static filterglobal_binding get(nitro_service service) throws Exception{
filterglobal_binding obj = new filterglobal_binding();
filterglobal_binding response = (filterglobal_binding) obj.get_resource(service);
return response;
} | java |
public static server_servicegroup_binding[] get(nitro_service service, String name) throws Exception{
server_servicegroup_binding obj = new server_servicegroup_binding();
obj.set_name(name);
server_servicegroup_binding response[] = (server_servicegroup_binding[]) obj.get_resources(service);
return response;
} | java |
public static dospolicy_stats[] get(nitro_service service) throws Exception{
dospolicy_stats obj = new dospolicy_stats();
dospolicy_stats[] response = (dospolicy_stats[])obj.stat_resources(service);
return response;
} | java |
public static dospolicy_stats get(nitro_service service, String name) throws Exception{
dospolicy_stats obj = new dospolicy_stats();
obj.set_name(name);
dospolicy_stats response = (dospolicy_stats) obj.stat_resource(service);
return response;
} | java |
public static <X, Y, Z> Triple<X, Y, Z> makeTriple(X x, Y y, Z z) {
return new Triple<X, Y, Z>(x, y, z);
} | java |
public static authenticationvserver_authenticationldappolicy_binding[] get(nitro_service service, String name) throws Exception{
authenticationvserver_authenticationldappolicy_binding obj = new authenticationvserver_authenticationldappolicy_binding();
obj.set_name(name);
authenticationvserver_authenticationldappolicy_binding response[] = (authenticationvserver_authenticationldappolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static responderglobal_binding get(nitro_service service) throws Exception{
responderglobal_binding obj = new responderglobal_binding();
responderglobal_binding response = (responderglobal_binding) obj.get_resource(service);
return response;
} | java |
public static sslvserver_sslpolicy_binding[] get(nitro_service service, String vservername) throws Exception{
sslvserver_sslpolicy_binding obj = new sslvserver_sslpolicy_binding();
obj.set_vservername(vservername);
sslvserver_sslpolicy_binding response[] = (sslvserver_sslpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static systemcounters get(nitro_service service) throws Exception{
systemcounters obj = new systemcounters();
systemcounters[] response = (systemcounters[])obj.get_resources(service);
return response[0];
} | java |
public static systemcounters[] get(nitro_service service, systemcounters_args args) throws Exception{
systemcounters obj = new systemcounters();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
systemcounters[] response = (systemcounters[])obj.get_resources(service, option);
return response;
} | java |
public static responderpolicylabel_policybinding_binding[] get(nitro_service service, String labelname) throws Exception{
responderpolicylabel_policybinding_binding obj = new responderpolicylabel_policybinding_binding();
obj.set_labelname(labelname);
responderpolicylabel_policybinding_binding response[] = (responderpolicylabel_policybinding_binding[]) obj.get_resources(service);
return response;
} | java |
public static channel_binding get(nitro_service service, String id) throws Exception{
channel_binding obj = new channel_binding();
obj.set_id(id);
channel_binding response = (channel_binding) obj.get_resource(service);
return response;
} | java |
public static appfwprofile_binding get(nitro_service service, String name) throws Exception{
appfwprofile_binding obj = new appfwprofile_binding();
obj.set_name(name);
appfwprofile_binding response = (appfwprofile_binding) obj.get_resource(service);
return response;
} | java |
public static lbvserver_auditsyslogpolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_auditsyslogpolicy_binding obj = new lbvserver_auditsyslogpolicy_binding();
obj.set_name(name);
lbvserver_auditsyslogpolicy_binding response[] = (lbvserver_auditsyslogpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static appfwprofile_sqlinjection_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_sqlinjection_binding obj = new appfwprofile_sqlinjection_binding();
obj.set_name(name);
appfwprofile_sqlinjection_binding response[] = (appfwprofile_sqlinjection_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response add(nitro_service client, clusternode resource) throws Exception {
clusternode addresource = new clusternode();
addresource.nodeid = resource.nodeid;
addresource.ipaddress = resource.ipaddress;
addresource.state = resource.state;
addresource.backplane = resource.backplane;
addresource.priority = resource.priority;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, clusternode resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternode addresources[] = new clusternode[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new clusternode();
addresources[i].nodeid = resources[i].nodeid;
addresources[i].ipaddress = resources[i].ipaddress;
addresources[i].state = resources[i].state;
addresources[i].backplane = resources[i].backplane;
addresources[i].priority = resources[i].priority;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response update(nitro_service client, clusternode resource) throws Exception {
clusternode updateresource = new clusternode();
updateresource.nodeid = resource.nodeid;
updateresource.state = resource.state;
updateresource.backplane = resource.backplane;
updateresource.priority = resource.priority;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, clusternode resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusternode updateresources[] = new clusternode[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new clusternode();
updateresources[i].nodeid = resources[i].nodeid;
updateresources[i].state = resources[i].state;
updateresources[i].backplane = resources[i].backplane;
updateresources[i].priority = resources[i].priority;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static base_response unset(nitro_service client, clusternode resource, String[] args) throws Exception{
clusternode unsetresource = new clusternode();
unsetresource.nodeid = resource.nodeid;
return unsetresource.unset_resource(client,args);
} | java |
public static base_responses unset(nitro_service client, Long nodeid[], String args[]) throws Exception {
base_responses result = null;
if (nodeid != null && nodeid.length > 0) {
clusternode unsetresources[] = new clusternode[nodeid.length];
for (int i=0;i<nodeid.length;i++){
unsetresources[i] = new clusternode();
unsetresources[i].nodeid = nodeid[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java |
public static base_response delete(nitro_service client, clusternode resource) throws Exception {
clusternode deleteresource = new clusternode();
deleteresource.nodeid = resource.nodeid;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, Long nodeid[]) throws Exception {
base_responses result = null;
if (nodeid != null && nodeid.length > 0) {
clusternode deleteresources[] = new clusternode[nodeid.length];
for (int i=0;i<nodeid.length;i++){
deleteresources[i] = new clusternode();
deleteresources[i].nodeid = nodeid[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java |
public static clusternode[] get(nitro_service service) throws Exception{
clusternode obj = new clusternode();
clusternode[] response = (clusternode[])obj.get_resources(service);
return response;
} | java |
public static clusternode get(nitro_service service, Long nodeid) throws Exception{
clusternode obj = new clusternode();
obj.set_nodeid(nodeid);
clusternode response = (clusternode) obj.get_resource(service);
return response;
} | java |
public static clusternode[] get(nitro_service service, Long nodeid[]) throws Exception{
if (nodeid !=null && nodeid.length>0) {
clusternode response[] = new clusternode[nodeid.length];
clusternode obj[] = new clusternode[nodeid.length];
for (int i=0;i<nodeid.length;i++) {
obj[i] = new clusternode();
obj[i].set_nodeid(nodeid[i]);
response[i] = (clusternode) obj[i].get_resource(service);
}
return response;
}
return null;
} | java |
public static clusternode[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
clusternode obj = new clusternode();
options option = new options();
option.set_filter(filter);
clusternode[] response = (clusternode[]) obj.getfiltered(service, option);
return response;
} | java |
public static sslpolicy_binding get(nitro_service service, String name) throws Exception{
sslpolicy_binding obj = new sslpolicy_binding();
obj.set_name(name);
sslpolicy_binding response = (sslpolicy_binding) obj.get_resource(service);
return response;
} | java |
public static lbvserver_responderpolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_responderpolicy_binding obj = new lbvserver_responderpolicy_binding();
obj.set_name(name);
lbvserver_responderpolicy_binding response[] = (lbvserver_responderpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static cmppolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
cmppolicy_csvserver_binding obj = new cmppolicy_csvserver_binding();
obj.set_name(name);
cmppolicy_csvserver_binding response[] = (cmppolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.