idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
2,600
public static base_responses delete ( nitro_service client , String prefix [ ] ) throws Exception { base_responses result = null ; if ( prefix != null && prefix . length > 0 ) { nsxmlnamespace deleteresources [ ] = new nsxmlnamespace [ prefix . length ] ; for ( int i = 0 ; i < prefix . length ; i ++ ) { deleteresources...
Use this API to delete nsxmlnamespace resources of given names .
2,601
public static base_response update ( nitro_service client , nsxmlnamespace resource ) throws Exception { nsxmlnamespace updateresource = new nsxmlnamespace ( ) ; updateresource . prefix = resource . prefix ; updateresource . Namespace = resource . Namespace ; updateresource . description = resource . description ; retu...
Use this API to update nsxmlnamespace .
2,602
public static base_responses update ( nitro_service client , nsxmlnamespace resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { nsxmlnamespace updateresources [ ] = new nsxmlnamespace [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i...
Use this API to update nsxmlnamespace resources .
2,603
public static base_response unset ( nitro_service client , nsxmlnamespace resource , String [ ] args ) throws Exception { nsxmlnamespace unsetresource = new nsxmlnamespace ( ) ; unsetresource . prefix = resource . prefix ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of nsxmlnamespace resource . Properties that need to be unset are specified in args array .
2,604
public static base_responses unset ( nitro_service client , String prefix [ ] , String args [ ] ) throws Exception { base_responses result = null ; if ( prefix != null && prefix . length > 0 ) { nsxmlnamespace unsetresources [ ] = new nsxmlnamespace [ prefix . length ] ; for ( int i = 0 ; i < prefix . length ; i ++ ) {...
Use this API to unset the properties of nsxmlnamespace resources . Properties that need to be unset are specified in args array .
2,605
public static nsxmlnamespace [ ] get ( nitro_service service ) throws Exception { nsxmlnamespace obj = new nsxmlnamespace ( ) ; nsxmlnamespace [ ] response = ( nsxmlnamespace [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the nsxmlnamespace resources that are configured on netscaler .
2,606
public static nsxmlnamespace get ( nitro_service service , String prefix ) throws Exception { nsxmlnamespace obj = new nsxmlnamespace ( ) ; obj . set_prefix ( prefix ) ; nsxmlnamespace response = ( nsxmlnamespace ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch nsxmlnamespace resource of given name .
2,607
public static nsxmlnamespace [ ] get ( nitro_service service , String prefix [ ] ) throws Exception { if ( prefix != null && prefix . length > 0 ) { nsxmlnamespace response [ ] = new nsxmlnamespace [ prefix . length ] ; nsxmlnamespace obj [ ] = new nsxmlnamespace [ prefix . length ] ; for ( int i = 0 ; i < prefix . len...
Use this API to fetch nsxmlnamespace resources of given names .
2,608
public static nsxmlnamespace [ ] get_filtered ( nitro_service service , filtervalue [ ] filter ) throws Exception { nsxmlnamespace obj = new nsxmlnamespace ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; nsxmlnamespace [ ] response = ( nsxmlnamespace [ ] ) obj . getfiltered ( service , option ...
Use this API to fetch filtered set of nsxmlnamespace resources . set the filter parameter values in filtervalue object .
2,609
public static lbvserver_appfwpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_appfwpolicy_binding obj = new lbvserver_appfwpolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_appfwpolicy_binding response [ ] = ( lbvserver_appfwpolicy_binding [ ] ) obj . get_resources ( se...
Use this API to fetch lbvserver_appfwpolicy_binding resources of given name .
2,610
public static sslservice_sslcertkey_binding [ ] get ( nitro_service service , String servicename ) throws Exception { sslservice_sslcertkey_binding obj = new sslservice_sslcertkey_binding ( ) ; obj . set_servicename ( servicename ) ; sslservice_sslcertkey_binding response [ ] = ( sslservice_sslcertkey_binding [ ] ) obj...
Use this API to fetch sslservice_sslcertkey_binding resources of given name .
2,611
public static base_response update ( nitro_service client , locationparameter resource ) throws Exception { locationparameter updateresource = new locationparameter ( ) ; updateresource . context = resource . context ; updateresource . q1label = resource . q1label ; updateresource . q2label = resource . q2label ; updat...
Use this API to update locationparameter .
2,612
public static base_response unset ( nitro_service client , locationparameter resource , String [ ] args ) throws Exception { locationparameter unsetresource = new locationparameter ( ) ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of locationparameter resource . Properties that need to be unset are specified in args array .
2,613
public static locationparameter get ( nitro_service service ) throws Exception { locationparameter obj = new locationparameter ( ) ; locationparameter [ ] response = ( locationparameter [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
Use this API to fetch all the locationparameter resources that are configured on netscaler .
2,614
public static base_response update ( nitro_service client , nsappflowparam resource ) throws Exception { nsappflowparam updateresource = new nsappflowparam ( ) ; updateresource . templaterefresh = resource . templaterefresh ; updateresource . udppmtu = resource . udppmtu ; updateresource . httpurl = resource . httpurl ...
Use this API to update nsappflowparam .
2,615
public static base_response unset ( nitro_service client , nsappflowparam resource , String [ ] args ) throws Exception { nsappflowparam unsetresource = new nsappflowparam ( ) ; return unsetresource . unset_resource ( client , args ) ; }
Use this API to unset the properties of nsappflowparam resource . Properties that need to be unset are specified in args array .
2,616
public static nsappflowparam get ( nitro_service service ) throws Exception { nsappflowparam obj = new nsappflowparam ( ) ; nsappflowparam [ ] response = ( nsappflowparam [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
Use this API to fetch all the nsappflowparam resources that are configured on netscaler .
2,617
public void randomize ( int randomSeed ) { Random rand = new Random ( randomSeed ) ; for ( int j = size - 1 ; j > 0 ; j -- ) { int randIndex = rand . nextInt ( j ) ; int [ ] tmp = data [ randIndex ] ; data [ randIndex ] = data [ j ] ; data [ j ] = tmp ; int tmpl = labels [ randIndex ] ; labels [ randIndex ] = labels [ ...
Randomizes the data array in place Needs to be redefined here because we need to randomize the weights as well
2,618
public static base_response add ( nitro_service client , scpolicy resource ) throws Exception { scpolicy addresource = new scpolicy ( ) ; addresource . name = resource . name ; addresource . url = resource . url ; addresource . rule = resource . rule ; addresource . delay = resource . delay ; addresource . maxconn = re...
Use this API to add scpolicy .
2,619
public static base_responses add ( nitro_service client , scpolicy resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { scpolicy addresources [ ] = new scpolicy [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i...
Use this API to add scpolicy resources .
2,620
public static base_response update ( nitro_service client , scpolicy resource ) throws Exception { scpolicy updateresource = new scpolicy ( ) ; updateresource . name = resource . name ; updateresource . url = resource . url ; updateresource . rule = resource . rule ; updateresource . delay = resource . delay ; updatere...
Use this API to update scpolicy .
2,621
public static base_responses update ( nitro_service client , scpolicy resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { scpolicy updateresources [ ] = new scpolicy [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updatereso...
Use this API to update scpolicy resources .
2,622
public static scpolicy [ ] get ( nitro_service service ) throws Exception { scpolicy obj = new scpolicy ( ) ; scpolicy [ ] response = ( scpolicy [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the scpolicy resources that are configured on netscaler .
2,623
public static scpolicy get ( nitro_service service , String name ) throws Exception { scpolicy obj = new scpolicy ( ) ; obj . set_name ( name ) ; scpolicy response = ( scpolicy ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch scpolicy resource of given name .
2,624
public final int needArgumentsNumber ( ) { int number = 0 ; for ( int i : needArgument ) { number = Math . max ( number , ( i + 1 ) ) ; } return number ; }
Need arguments number .
2,625
public static csvserver_rewritepolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { csvserver_rewritepolicy_binding obj = new csvserver_rewritepolicy_binding ( ) ; obj . set_name ( name ) ; csvserver_rewritepolicy_binding response [ ] = ( csvserver_rewritepolicy_binding [ ] ) obj . get_reso...
Use this API to fetch csvserver_rewritepolicy_binding resources of given name .
2,626
@ SuppressWarnings ( "rawtypes" ) public final Map < String , MtasDataItemNumberComparator > getComparatorList ( ) throws IOException { if ( collectorType . equals ( DataCollector . COLLECTOR_TYPE_LIST ) ) { LinkedHashMap < String , MtasDataItemNumberComparator > comparatorList = new LinkedHashMap < > ( ) ; for ( Entry...
Gets the comparator list .
2,627
public static lbvserver_cmppolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_cmppolicy_binding obj = new lbvserver_cmppolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_cmppolicy_binding response [ ] = ( lbvserver_cmppolicy_binding [ ] ) obj . get_resources ( service ) ; ...
Use this API to fetch lbvserver_cmppolicy_binding resources of given name .
2,628
public static base_response add ( nitro_service client , appfwconfidfield resource ) throws Exception { appfwconfidfield addresource = new appfwconfidfield ( ) ; addresource . fieldname = resource . fieldname ; addresource . url = resource . url ; addresource . isregex = resource . isregex ; addresource . comment = res...
Use this API to add appfwconfidfield .
2,629
public static base_responses add ( nitro_service client , appfwconfidfield resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appfwconfidfield addresources [ ] = new appfwconfidfield [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i...
Use this API to add appfwconfidfield resources .
2,630
public static base_response delete ( nitro_service client , String fieldname ) throws Exception { appfwconfidfield deleteresource = new appfwconfidfield ( ) ; deleteresource . fieldname = fieldname ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete appfwconfidfield of given name .
2,631
public static base_response delete ( nitro_service client , appfwconfidfield resource ) throws Exception { appfwconfidfield deleteresource = new appfwconfidfield ( ) ; deleteresource . fieldname = resource . fieldname ; deleteresource . url = resource . url ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete appfwconfidfield .
2,632
public static base_responses delete ( nitro_service client , String fieldname [ ] ) throws Exception { base_responses result = null ; if ( fieldname != null && fieldname . length > 0 ) { appfwconfidfield deleteresources [ ] = new appfwconfidfield [ fieldname . length ] ; for ( int i = 0 ; i < fieldname . length ; i ++ ...
Use this API to delete appfwconfidfield resources of given names .
2,633
public static base_responses delete ( nitro_service client , appfwconfidfield resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appfwconfidfield deleteresources [ ] = new appfwconfidfield [ resources . length ] ; for ( int i = 0 ; i < resources . leng...
Use this API to delete appfwconfidfield resources .
2,634
public static base_response update ( nitro_service client , appfwconfidfield resource ) throws Exception { appfwconfidfield updateresource = new appfwconfidfield ( ) ; updateresource . fieldname = resource . fieldname ; updateresource . url = resource . url ; updateresource . comment = resource . comment ; updateresour...
Use this API to update appfwconfidfield .
2,635
public static base_responses update ( nitro_service client , appfwconfidfield resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appfwconfidfield updateresources [ ] = new appfwconfidfield [ resources . length ] ; for ( int i = 0 ; i < resources . leng...
Use this API to update appfwconfidfield resources .
2,636
public static base_response unset ( nitro_service client , appfwconfidfield resource , String [ ] args ) throws Exception { appfwconfidfield unsetresource = new appfwconfidfield ( ) ; unsetresource . fieldname = resource . fieldname ; unsetresource . url = resource . url ; return unsetresource . unset_resource ( client...
Use this API to unset the properties of appfwconfidfield resource . Properties that need to be unset are specified in args array .
2,637
public static base_responses unset ( nitro_service client , appfwconfidfield resources [ ] , String [ ] args ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { appfwconfidfield unsetresources [ ] = new appfwconfidfield [ resources . length ] ; for ( int i = 0 ; i < ...
Use this API to unset the properties of appfwconfidfield resources . Properties that need to be unset are specified in args array .
2,638
public static appfwconfidfield [ ] get ( nitro_service service ) throws Exception { appfwconfidfield obj = new appfwconfidfield ( ) ; appfwconfidfield [ ] response = ( appfwconfidfield [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the appfwconfidfield resources that are configured on netscaler .
2,639
public static base_response add ( nitro_service client , dnsnsrec resource ) throws Exception { dnsnsrec addresource = new dnsnsrec ( ) ; addresource . domain = resource . domain ; addresource . nameserver = resource . nameserver ; addresource . ttl = resource . ttl ; return addresource . add_resource ( client ) ; }
Use this API to add dnsnsrec .
2,640
public static base_responses add ( nitro_service client , dnsnsrec resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { dnsnsrec addresources [ ] = new dnsnsrec [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i...
Use this API to add dnsnsrec resources .
2,641
public static base_response delete ( nitro_service client , dnsnsrec resource ) throws Exception { dnsnsrec deleteresource = new dnsnsrec ( ) ; deleteresource . domain = resource . domain ; deleteresource . nameserver = resource . nameserver ; return deleteresource . delete_resource ( client ) ; }
Use this API to delete dnsnsrec .
2,642
public static dnsnsrec [ ] get ( nitro_service service ) throws Exception { dnsnsrec obj = new dnsnsrec ( ) ; dnsnsrec [ ] response = ( dnsnsrec [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the dnsnsrec resources that are configured on netscaler .
2,643
public static dnsnsrec [ ] get ( nitro_service service , dnsnsrec_args args ) throws Exception { dnsnsrec obj = new dnsnsrec ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; dnsnsrec [ ] response = ( dnsnsrec [ ] ) obj . get_resources ( service , opti...
Use this API to fetch all the dnsnsrec resources that are configured on netscaler . This uses dnsnsrec_args which is a way to provide additional arguments while fetching the resources .
2,644
public static dnsnsrec get ( nitro_service service , String domain ) throws Exception { dnsnsrec obj = new dnsnsrec ( ) ; obj . set_domain ( domain ) ; dnsnsrec response = ( dnsnsrec ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch dnsnsrec resource of given name .
2,645
public static File writeObjectToTempFile ( Object o , String filename ) throws IOException { File file = File . createTempFile ( filename , ".tmp" ) ; file . deleteOnExit ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( new BufferedOutputStream ( new GZIPOutputStream ( new FileOutputStream ( file ) ) ) ) ; oos ....
Write object to temp file which is destroyed when the program exits .
2,646
public static File writeObjectToTempFileNoExceptions ( Object o , String filename ) { try { return writeObjectToTempFile ( o , filename ) ; } catch ( Exception e ) { System . err . println ( "Error writing object to file " + filename ) ; e . printStackTrace ( ) ; return null ; } }
Write object to a temp file and ignore exceptions .
2,647
public static void writeStringToFile ( String contents , String path , String encoding ) throws IOException { OutputStream writer = null ; if ( path . endsWith ( ".gz" ) ) { writer = new GZIPOutputStream ( new FileOutputStream ( path ) ) ; } else { writer = new BufferedOutputStream ( new FileOutputStream ( path ) ) ; }...
Writes a string to a file
2,648
public static void writeStringToFileNoExceptions ( String contents , String path , String encoding ) { OutputStream writer = null ; try { if ( path . endsWith ( ".gz" ) ) { writer = new GZIPOutputStream ( new FileOutputStream ( path ) ) ; } else { writer = new BufferedOutputStream ( new FileOutputStream ( path ) ) ; } ...
Writes a string to a file squashing exceptions
2,649
public static File writeStringToTempFile ( String contents , String path , String encoding ) throws IOException { OutputStream writer = null ; File tmp = File . createTempFile ( path , ".tmp" ) ; if ( path . endsWith ( ".gz" ) ) { writer = new GZIPOutputStream ( new FileOutputStream ( tmp ) ) ; } else { writer = new Bu...
Writes a string to a temporary file
2,650
public static File writeStringToTempFileNoExceptions ( String contents , String path , String encoding ) { OutputStream writer = null ; File tmp = null ; try { tmp = File . createTempFile ( path , ".tmp" ) ; if ( path . endsWith ( ".gz" ) ) { writer = new GZIPOutputStream ( new FileOutputStream ( tmp ) ) ; } else { wri...
Writes a string to a temporary file squashing exceptions
2,651
public static < T > T readObjectFromFileNoExceptions ( File file ) { Object o = null ; try { ObjectInputStream ois = new ObjectInputStream ( new BufferedInputStream ( new GZIPInputStream ( new FileInputStream ( file ) ) ) ) ; o = ois . readObject ( ) ; ois . close ( ) ; } catch ( IOException e ) { e . printStackTrace (...
Read an object from a stored file without throwing exceptions .
2,652
private static InputStream findStreamInClasspathOrFileSystem ( String fn ) throws FileNotFoundException { InputStream is = IOUtils . class . getClassLoader ( ) . getResourceAsStream ( fn ) ; if ( is == null ) is = new FileInputStream ( fn ) ; return is ; }
Locates this file either in the CLASSPATH or in the file system . The CLASSPATH takes priority
2,653
public static InputStream openFile ( File file ) throws RuntimeIOException { try { InputStream is = new BufferedInputStream ( new FileInputStream ( file ) ) ; if ( file . getName ( ) . endsWith ( ".gz" ) ) { is = new GZIPInputStream ( is ) ; } return is ; } catch ( Exception e ) { throw new RuntimeIOException ( e ) ; }...
Quietly opens a File . If the file ends with a . gz extension automatically opens a GZIPInputStream to wrap the constructed FileInputStream .
2,654
public static String slurpFile ( String filename , String encoding ) throws IOException { Reader r = new InputStreamReader ( new FileInputStream ( filename ) , encoding ) ; return IOUtils . slurpReader ( r ) ; }
Returns all the text in the given file with the given encoding .
2,655
public static String slurpReader ( Reader reader ) { BufferedReader r = new BufferedReader ( reader ) ; StringBuilder buff = new StringBuilder ( ) ; try { char [ ] chars = new char [ SLURPBUFFSIZE ] ; while ( true ) { int amountRead = r . read ( chars , 0 , SLURPBUFFSIZE ) ; if ( amountRead < 0 ) { break ; } buff . app...
Returns all the text from the given Reader .
2,656
public static void writeStreamToStream ( InputStream input , OutputStream output ) throws IOException { byte [ ] buffer = new byte [ 4096 ] ; while ( true ) { int len = input . read ( buffer ) ; if ( len == - 1 ) { break ; } output . write ( buffer , 0 , len ) ; } }
Send all bytes from the input stream to the output stream .
2,657
public static List < Map < String , String > > readCSVWithHeader ( String path , char quoteChar , char escapeChar ) throws IOException { String [ ] labels = null ; List < Map < String , String > > rows = Generics . newArrayList ( ) ; for ( String line : IOUtils . readLines ( path ) ) { System . out . println ( "Splitti...
Read in a CSV formatted file with a header row
2,658
public static Set < String > readColumnSet ( String infile , int field ) throws IOException { BufferedReader br = IOUtils . getBufferedFileReader ( infile ) ; String line ; Set < String > set = new HashSet < String > ( ) ; while ( ( line = br . readLine ( ) ) != null ) { line = line . trim ( ) ; if ( line . length ( ) ...
Read column as set
2,659
public static String stringFromFile ( String filename , String encoding ) { try { StringBuilder sb = new StringBuilder ( ) ; BufferedReader in = new BufferedReader ( new EncodingFileReader ( filename , encoding ) ) ; String line ; while ( ( line = in . readLine ( ) ) != null ) { sb . append ( line ) ; sb . append ( eol...
Returns the contents of a file as a single string . The string may be empty if the file is empty . If there is an IOException it is caught and null is returned . Encoding can also be specified .
2,660
public static List < String > linesFromFile ( String filename , String encoding ) { try { List < String > lines = new ArrayList < String > ( ) ; BufferedReader in = new BufferedReader ( new EncodingFileReader ( filename , encoding ) ) ; String line ; while ( ( line = in . readLine ( ) ) != null ) { lines . add ( line )...
Returns the contents of a file as a list of strings . The list may be empty if the file is empty . If there is an IOException it is caught and null is returned . Encoding can also be specified
2,661
public static File getJNLPLocalScratch ( ) { try { String machineName = InetAddress . getLocalHost ( ) . getHostName ( ) . split ( "\\." ) [ 0 ] ; String username = System . getProperty ( "user.name" ) ; return new File ( "/" + machineName + "/scr1/" + username ) ; } catch ( Exception e ) { return new File ( "./scr/" )...
A JavaNLP specific convenience routine for obtaining the current scratch directory for the machine you re currently running on .
2,662
public static File ensureDir ( File tgtDir ) throws Exception { if ( tgtDir . exists ( ) ) { if ( tgtDir . isDirectory ( ) ) return tgtDir ; else throw new Exception ( "Could not create directory " + tgtDir . getAbsolutePath ( ) + ", as a file already exists at that path." ) ; } else { tgtDir . mkdirs ( ) ; return tgtD...
Given a filepath makes sure a directory exists there . If not creates and returns it . Same as ENSURE - DIRECTORY in CL .
2,663
public void compact ( ) { if ( keys . length > size ) { Class < ? > [ ] newKeys = new Class < ? > [ size ] ; Object [ ] newVals = new Object [ size ] ; System . arraycopy ( keys , 0 , newKeys , 0 , size ) ; System . arraycopy ( values , 0 , newVals , 0 , size ) ; keys = newKeys ; values = newVals ; } }
Reduces memory consumption to the minimum for representing the values currently stored stored in this object .
2,664
public static base_response add ( nitro_service client , route resource ) throws Exception { route addresource = new route ( ) ; addresource . network = resource . network ; addresource . netmask = resource . netmask ; addresource . gateway = resource . gateway ; addresource . cost = resource . cost ; addresource . td ...
Use this API to add route .
2,665
public static base_responses add ( nitro_service client , route resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { route addresources [ ] = new route [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new ...
Use this API to add route resources .
2,666
public static base_response delete ( nitro_service client , route resource ) throws Exception { route deleteresource = new route ( ) ; deleteresource . network = resource . network ; deleteresource . netmask = resource . netmask ; deleteresource . gateway = resource . gateway ; deleteresource . td = resource . td ; ret...
Use this API to delete route .
2,667
public static base_responses delete ( nitro_service client , route resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { route deleteresources [ ] = new route [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { deleteresources [ i...
Use this API to delete route resources .
2,668
public static base_response update ( nitro_service client , route resource ) throws Exception { route updateresource = new route ( ) ; updateresource . network = resource . network ; updateresource . netmask = resource . netmask ; updateresource . gateway = resource . gateway ; updateresource . td = resource . td ; upd...
Use this API to update route .
2,669
public static base_responses update ( nitro_service client , route resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { route updateresources [ ] = new route [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { updateresources [ i...
Use this API to update route resources .
2,670
public static base_response unset ( nitro_service client , route resource , String [ ] args ) throws Exception { route unsetresource = new route ( ) ; unsetresource . network = resource . network ; unsetresource . netmask = resource . netmask ; unsetresource . gateway = resource . gateway ; unsetresource . td = resourc...
Use this API to unset the properties of route resource . Properties that need to be unset are specified in args array .
2,671
public static route [ ] get ( nitro_service service , options option ) throws Exception { route obj = new route ( ) ; route [ ] response = ( route [ ] ) obj . get_resources ( service , option ) ; return response ; }
Use this API to fetch all the route resources that are configured on netscaler .
2,672
public static route [ ] get ( nitro_service service , route_args args ) throws Exception { route obj = new route ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; route [ ] response = ( route [ ] ) obj . get_resources ( service , option ) ; return resp...
Use this API to fetch all the route resources that are configured on netscaler . This uses route_args which is a way to provide additional arguments while fetching the resources .
2,673
public static base_response add ( nitro_service client , nsappflowcollector resource ) throws Exception { nsappflowcollector addresource = new nsappflowcollector ( ) ; addresource . name = resource . name ; addresource . ipaddress = resource . ipaddress ; addresource . port = resource . port ; return addresource . add_...
Use this API to add nsappflowcollector .
2,674
public static nsappflowcollector [ ] get ( nitro_service service ) throws Exception { nsappflowcollector obj = new nsappflowcollector ( ) ; nsappflowcollector [ ] response = ( nsappflowcollector [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the nsappflowcollector resources that are configured on netscaler .
2,675
public static nsappflowcollector get ( nitro_service service , String name ) throws Exception { nsappflowcollector obj = new nsappflowcollector ( ) ; obj . set_name ( name ) ; nsappflowcollector response = ( nsappflowcollector ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch nsappflowcollector resource of given name .
2,676
public void setValue ( String fieldName , String value ) { int index = getFieldIndex ( fieldName ) ; assert ( index != - 1 ) ; values [ index ] = value ; }
Sets template values .
2,677
public static systemcountergroup get ( nitro_service service ) throws Exception { systemcountergroup obj = new systemcountergroup ( ) ; systemcountergroup [ ] response = ( systemcountergroup [ ] ) obj . get_resources ( service ) ; return response [ 0 ] ; }
Use this API to fetch all the systemcountergroup resources that are configured on netscaler .
2,678
public static systemcountergroup [ ] get ( nitro_service service , systemcountergroup_args args ) throws Exception { systemcountergroup obj = new systemcountergroup ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; systemcountergroup [ ] response = ( s...
Use this API to fetch all the systemcountergroup resources that are configured on netscaler . This uses systemcountergroup_args which is a way to provide additional arguments while fetching the resources .
2,679
static Relation getRelation ( String s , String arg , Function < String , String > basicCatFunction , HeadFinder headFinder ) throws ParseException { if ( arg == null ) { return getRelation ( s , basicCatFunction , headFinder ) ; } Relation r ; if ( s . equals ( "<" ) ) { r = new HasIthChild ( Integer . parseInt ( arg ...
Static factory method for relations requiring an argument including HAS_ITH_CHILD ITH_CHILD_OF UNBROKEN_CATEGORY_DOMINATES UNBROKEN_CATEGORY_DOMINATED_BY .
2,680
public T next ( ) { if ( nextToken == null ) { nextToken = getNext ( ) ; } T result = nextToken ; nextToken = null ; if ( result == null ) { throw new NoSuchElementException ( ) ; } return result ; }
Returns the next token from this Tokenizer .
2,681
public T peek ( ) { if ( nextToken == null ) { nextToken = getNext ( ) ; } if ( nextToken == null ) { throw new NoSuchElementException ( ) ; } return nextToken ; }
This is an optional operation by default supported .
2,682
public List < T > tokenize ( ) { List < T > result = new ArrayList < T > ( ) ; while ( hasNext ( ) ) { result . add ( next ( ) ) ; } return result ; }
Returns text as a List of tokens .
2,683
public static lbvserver_transformpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { lbvserver_transformpolicy_binding obj = new lbvserver_transformpolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_transformpolicy_binding response [ ] = ( lbvserver_transformpolicy_binding [ ] ) obj ...
Use this API to fetch lbvserver_transformpolicy_binding resources of given name .
2,684
private static ArrayList < NamedList < Object > > rewriteToArray ( NamedList < Object > nnl ) { ArrayList < NamedList < Object > > al = new ArrayList < > ( ) ; String key ; Iterator < Entry < String , Object > > it = nnl . iterator ( ) ; while ( it . hasNext ( ) ) { Entry < String , Object > entry = it . next ( ) ; Nam...
Rewrite to array .
2,685
@ SuppressWarnings ( { "unchecked" , "unused" } ) private static void rewriteMergeList ( String key , String subKey , NamedList < Object > snl , NamedList < Object > tnl ) { for ( int i = 0 ; i < tnl . size ( ) ; i ++ ) { Object item = snl . get ( tnl . getName ( i ) ) ; if ( item != null && tnl . getVal ( i ) instance...
Rewrite merge list .
2,686
@ SuppressWarnings ( { "unused" , "unchecked" } ) private static void rewriteMergeData ( String key , String subKey , NamedList < Object > snl , NamedList < Object > tnl ) { if ( snl != null ) { Object o = tnl . get ( key ) ; NamedList < Object > tnnnl ; if ( o != null && o instanceof NamedList ) { tnnnl = ( NamedList ...
Rewrite merge data .
2,687
public static SortedSet < String > getIdsFromParameters ( SolrParams params , String prefix ) { SortedSet < String > ids = new TreeSet < > ( ) ; Iterator < String > it = params . getParameterNamesIterator ( ) ; Pattern pattern = Pattern . compile ( "^" + Pattern . quote ( prefix ) + "\\.([^\\.]+)(\\..*|$)" ) ; while ( ...
Gets the ids from parameters .
2,688
public static void compareAndCheck ( String [ ] list , String [ ] original , String nameNew , String nameOriginal , Boolean unique ) throws IOException { if ( list != null ) { if ( list . length != original . length ) { throw new IOException ( "unequal size " + nameNew + " and " + nameOriginal ) ; } if ( unique ) { Set...
Compare and check .
2,689
public static MtasSpanQuery constructQuery ( String queryValue , String queryType , String queryPrefix , HashMap < String , String [ ] > queryVariables , String field , String queryIgnore , Integer maximumIgnoreLength ) throws IOException { if ( queryType == null || queryType . isEmpty ( ) ) { throw new IOException ( "...
Construct query .
2,690
public void loadDefault ( ) { try { load ( new BufferedReader ( new StringReader ( DefaultTeXHyphenData . hyphenData ) ) ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
Loads the default hyphenation rules in DefaultTeXHyphenator .
2,691
public static filterpolicy_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { filterpolicy_lbvserver_binding obj = new filterpolicy_lbvserver_binding ( ) ; obj . set_name ( name ) ; filterpolicy_lbvserver_binding response [ ] = ( filterpolicy_lbvserver_binding [ ] ) obj . get_resources...
Use this API to fetch filterpolicy_lbvserver_binding resources of given name .
2,692
public static base_response add ( nitro_service client , appflowcollector resource ) throws Exception { appflowcollector addresource = new appflowcollector ( ) ; addresource . name = resource . name ; addresource . ipaddress = resource . ipaddress ; addresource . port = resource . port ; addresource . netprofile = reso...
Use this API to add appflowcollector .
2,693
public static appflowcollector [ ] get ( nitro_service service ) throws Exception { appflowcollector obj = new appflowcollector ( ) ; appflowcollector [ ] response = ( appflowcollector [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the appflowcollector resources that are configured on netscaler .
2,694
public static appflowcollector get ( nitro_service service , String name ) throws Exception { appflowcollector obj = new appflowcollector ( ) ; obj . set_name ( name ) ; appflowcollector response = ( appflowcollector ) obj . get_resource ( service ) ; return response ; }
Use this API to fetch appflowcollector resource of given name .
2,695
public static base_response add ( nitro_service client , responderaction resource ) throws Exception { responderaction addresource = new responderaction ( ) ; addresource . name = resource . name ; addresource . type = resource . type ; addresource . target = resource . target ; addresource . htmlpage = resource . html...
Use this API to add responderaction .
2,696
public static base_responses add ( nitro_service client , responderaction resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { responderaction addresources [ ] = new responderaction [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++...
Use this API to add responderaction resources .
2,697
public static base_response update ( nitro_service client , responderaction resource ) throws Exception { responderaction updateresource = new responderaction ( ) ; updateresource . name = resource . name ; updateresource . target = resource . target ; updateresource . bypasssafetycheck = resource . bypasssafetycheck ;...
Use this API to update responderaction .
2,698
public static base_responses update ( nitro_service client , responderaction resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { responderaction updateresources [ ] = new responderaction [ resources . length ] ; for ( int i = 0 ; i < resources . length ...
Use this API to update responderaction resources .
2,699
public static responderaction [ ] get ( nitro_service service ) throws Exception { responderaction obj = new responderaction ( ) ; responderaction [ ] response = ( responderaction [ ] ) obj . get_resources ( service ) ; return response ; }
Use this API to fetch all the responderaction resources that are configured on netscaler .