idx
int64
0
41.2k
question
stringlengths
74
4.21k
target
stringlengths
5
888
22,800
public void sleep ( int time ) { if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "sleep(" + time + ")" ) ; } sleeper . sleep ( time ) ; }
Robotium will sleep for the specified time .
22,801
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) private static int initializeTimeout ( String property , int defaultValue ) { try { Class clazz = Class . forName ( "android.os.SystemProperties" ) ; Method method = clazz . getDeclaredMethod ( "get" , String . class ) ; String value = ( String ) method . invoke ( nul...
Parse a timeout value set using adb shell .
22,802
public void setUrlpath ( String urlpath ) { if ( StringUtil . isEmpty ( urlpath ) ) return ; this . urlpath = urlpath . toLowerCase ( ) . trim ( ) ; }
set the value urlpath Specifies the URL path for files if type = file and type = path . When the collection is searched with cfsearch the pathname is automatically be prepended to filenames and returned as the url attribute .
22,803
public void setType ( String type ) throws PageException { if ( type == null ) return ; try { this . type = toType ( type ) ; } catch ( SearchException e ) { throw Caster . toPageException ( e ) ; } }
set the value type Specifies the type of entity being indexed . Default is CUSTOM .
22,804
public void setLanguage ( String language ) { if ( StringUtil . isEmpty ( language ) ) return ; this . language = Collection . validateLanguage ( language ) ; }
set the value language
22,805
public void setExtensions ( String extensions ) throws PageException { if ( extensions == null ) return ; this . extensions = ListUtil . toStringArrayTrim ( ListUtil . listToArray ( extensions , ',' ) ) ; }
set the value extensions
22,806
public void setCollection ( String collection ) throws PageException { try { this . collection = pageContext . getConfig ( ) . getSearchEngine ( pageContext ) . getCollectionByName ( collection . toLowerCase ( ) . trim ( ) ) ; } catch ( SearchException e ) { throw Caster . toPageException ( e ) ; } }
set the value collection Specifies a collection name . If you are indexing an external collection external = Yes specify the collection name including fully qualified path .
22,807
private void doDelete ( ) throws PageException , SearchException { required ( "index" , action , "collection" , collection ) ; if ( type != SearchIndex . TYPE_CUSTOM ) required ( "index" , action , "key" , key ) ; if ( type == - 1 ) { if ( query != null ) { type = SearchIndex . TYPE_CUSTOM ; } else { Resource file = nu...
delete a collection
22,808
private void doUpdate ( ) throws PageException , SearchException , IOException { required ( "index" , action , "collection" , collection ) ; required ( "index" , action , "key" , key ) ; if ( type == - 1 ) type = ( query == null ) ? SearchIndex . TYPE_FILE : SearchIndex . TYPE_CUSTOM ; if ( type == SearchIndex . TYPE_C...
update a collection
22,809
public Resource _getResource ( String name ) { Resource f = directory . getRealResource ( name ) ; if ( f != null && f . exists ( ) && f . isFile ( ) ) return f ; return null ; }
returns matching File Object or null if file not exust
22,810
public long getOffset ( ) throws IOException { DatagramSocket socket = null ; try { socket = new DatagramSocket ( ) ; socket . setSoTimeout ( 20000 ) ; InetAddress address = InetAddress . getByName ( serverName ) ; byte [ ] buf = new NtpMessage ( ) . toByteArray ( ) ; DatagramPacket packet = new DatagramPacket ( buf , ...
returns the offest from the ntp server to local system
22,811
public static Object call ( PageContext pc , String sql , Object params , Struct options , String name ) throws PageException { PageContextImpl pci = ( PageContextImpl ) pc ; lucee . runtime . tag . Query qry = ( lucee . runtime . tag . Query ) pci . use ( lucee . runtime . tag . Query . class . getName ( ) , "cfquery"...
name is set by evaluator
22,812
public static String toStringPriority ( int priority ) { if ( priority == Thread . NORM_PRIORITY ) return "NORMAL" ; if ( priority == Thread . MAX_PRIORITY ) return "HIGH" ; if ( priority == Thread . MIN_PRIORITY ) return "LOW" ; return null ; }
return priority as a String representation
22,813
public static int toIntPriority ( String strPriority ) { strPriority = strPriority . trim ( ) . toLowerCase ( ) ; if ( "low" . equals ( strPriority ) ) return Thread . MIN_PRIORITY ; if ( "min" . equals ( strPriority ) ) return Thread . MIN_PRIORITY ; if ( "high" . equals ( strPriority ) ) return Thread . MAX_PRIORITY ...
return priority as a int representation
22,814
public void start ( ) throws MessagingException { Properties properties = new Properties ( ) ; String type = getTypeAsString ( ) ; properties . put ( "mail." + type + ".host" , server ) ; properties . put ( "mail." + type + ".port" , new Double ( port ) ) ; properties . put ( "mail." + type + ".connectiontimeout" , Str...
connects to pop server
22,815
public void deleteMails ( String as [ ] , String as1 [ ] ) throws MessagingException , IOException { Folder folder ; Message amessage [ ] ; folder = _store . getFolder ( "INBOX" ) ; folder . open ( 2 ) ; Map < String , Message > map = getMessages ( null , folder , as1 , as , startrow , maxrows , false ) ; Iterator < St...
delete all message in ibox that match given criteria
22,816
public Query getMails ( String [ ] messageNumbers , String [ ] uids , boolean all ) throws MessagingException , IOException { Query qry = new QueryImpl ( all ? _fldnew : _flddo , 0 , "query" ) ; Folder folder = _store . getFolder ( "INBOX" ) ; folder . open ( Folder . READ_ONLY ) ; try { getMessages ( qry , folder , ui...
return all messages from inbox
22,817
private Map < String , Message > getMessages ( Query qry , Folder folder , String [ ] uids , String [ ] messageNumbers , int startRow , int maxRow , boolean all ) throws MessagingException { Message [ ] messages = folder . getMessages ( ) ; Map < String , Message > map = qry == null ? new HashMap < String , Message > (...
gets all messages from given Folder that match given criteria
22,818
private void getContent ( Query query , Message message , int row ) throws MessagingException , IOException { StringBuffer body = new StringBuffer ( ) ; Struct cids = new StructImpl ( ) ; query . setAtEL ( CIDS , row , cids ) ; if ( message . isMimeType ( "text/plain" ) ) { String content = getConent ( message ) ; quer...
write content data to query
22,819
public void setFinally ( Body body , Position finallyLine ) { body . setParent ( this ) ; this . finallyBody = body ; this . finallyLine = finallyLine ; }
sets finally body
22,820
private void writeOutTypeCondition ( BytecodeContext bc ) throws TransformerException { WhileVisitor whileVisitor = new WhileVisitor ( ) ; loopVisitor = whileVisitor ; whileVisitor . visitBeforeExpression ( bc ) ; bc . getFactory ( ) . toExprBoolean ( getAttribute ( "condition" ) . getValue ( ) ) . writeOut ( bc , Expr...
write out condition loop
22,821
public static String call ( PageContext pc , Object object ) throws PageException { return call ( pc , object , null , true , 9999 , null , null , null , null , 9999 , true , true ) ; }
private static final int FORMAT_TYPE_TEXT = 1 ;
22,822
public static Compress getInstance ( Resource zipFile , int format , boolean caseSensitive ) throws IOException { ConfigImpl config = ( ConfigImpl ) ThreadLocalPageContext . getConfig ( ) ; return config . getCompressInstance ( zipFile , format , caseSensitive ) ; }
return zip instance matching the zipfile singelton instance only 1 zip for one file
22,823
public void setRequesttimeout ( double requesttimeout ) { long rt ; if ( requesttimeout <= 0 ) rt = Long . MAX_VALUE ; else rt = ( long ) ( requesttimeout * 1000 ) ; pageContext . setRequestTimeout ( rt ) ; }
set the value requesttimeout
22,824
public void setEnablecfoutputonly ( Object enablecfoutputonly ) throws PageException { if ( enablecfoutputonly instanceof String && Caster . toString ( enablecfoutputonly ) . trim ( ) . equalsIgnoreCase ( "reset" ) ) { pageContext . setCFOutputOnly ( ( short ) 0 ) ; } else { pageContext . setCFOutputOnly ( Caster . toB...
set the value enablecfoutputonly Yes or No . When set to Yes cfsetting blocks output of HTML that resides outside cfoutput tags .
22,825
public String transform ( String html , URL url , boolean setBaseTag ) throws PageException { StringBuffer target = new StringBuffer ( ) ; SourceCode cfml = new SourceCode ( html , false , CFMLEngine . DIALECT_CFML ) ; while ( ! cfml . isAfterLast ( ) ) { if ( cfml . forwardIfCurrent ( '<' ) ) { target . append ( '<' )...
transform the HTML String
22,826
public DatasourceConnection getDatasourceConnection ( Config config , DataSource datasource , String user , String pass ) throws PageException { config = ThreadLocalPageContext . getConfig ( config ) ; if ( StringUtil . isEmpty ( user ) ) { user = datasource . getUsername ( ) ; pass = datasource . getPassword ( ) ; } i...
!!! do not change used in hibernate extension
22,827
public Map < String , Integer > openConnections ( ) { Map < String , Integer > map = new HashMap < String , Integer > ( ) ; Iterator < DCStack > it = dcs . values ( ) . iterator ( ) ; DCStack dcstack ; while ( it . hasNext ( ) ) { dcstack = it . next ( ) ; Integer val = map . get ( dcstack . getDatasource ( ) . getName...
do not change interface used by argus monitor
22,828
public static Array listToArray ( String list , char delimiter ) { if ( list . length ( ) == 0 ) return new ArrayImpl ( ) ; int len = list . length ( ) ; int last = 0 ; Array array = new ArrayImpl ( ) ; try { for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { array . append ( list . substrin...
casts a list to Array object
22,829
public static Array listToArrayRemoveEmpty ( String list , char delimiter ) { int len = list . length ( ) ; ArrayImpl array = new ArrayImpl ( ) ; if ( len == 0 ) return array ; int last = 0 ; for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { if ( last < i ) array . appendEL ( list . substri...
casts a list to Array object remove Empty Elements
22,830
public static Array listToArrayTrim ( String list , char delimiter ) { if ( list . length ( ) == 0 ) return new ArrayImpl ( ) ; while ( list . indexOf ( delimiter ) == 0 ) { list = list . substring ( 1 ) ; } int len = list . length ( ) ; if ( len == 0 ) return new ArrayImpl ( ) ; while ( list . lastIndexOf ( delimiter ...
casts a list to Array object remove all empty items at start and end of the list
22,831
public static int listFind ( String list , String value , String delimiter ) { Array arr = listToArrayTrim ( list , delimiter ) ; int len = arr . size ( ) ; for ( int i = 1 ; i <= len ; i ++ ) { if ( arr . get ( i , "" ) . equals ( value ) ) return i - 1 ; } return - 1 ; }
finds a value inside a list do not case sensitive
22,832
public static int listFindIgnoreEmpty ( String list , String value , char delimiter ) { if ( list == null ) return - 1 ; int len = list . length ( ) ; if ( len == 0 ) return - 1 ; int last = 0 ; int count = 0 ; for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { if ( last < i ) { if ( list . ...
finds a value inside a list case sensitive ignore empty items
22,833
public static int listContainsNoCase ( String list , String value , String delimiter , boolean includeEmptyFields , boolean multiCharacterDelimiter ) { if ( StringUtil . isEmpty ( value ) ) return - 1 ; Array arr = listToArray ( list , delimiter , includeEmptyFields , multiCharacterDelimiter ) ; int len = arr . size ( ...
returns if a value of the list contains given value ignore case
22,834
public static String arrayToListTrim ( String [ ] array , String delimiter ) { return trim ( arrayToList ( array , delimiter ) , delimiter , false ) ; }
convert a string array to string list removes empty values at begin and end of the list
22,835
public static String arrayToList ( String [ ] array , String delimiter ) { if ( ArrayUtil . isEmpty ( array ) ) return "" ; StringBuilder sb = new StringBuilder ( array [ 0 ] ) ; if ( delimiter . length ( ) == 1 ) { char c = delimiter . charAt ( 0 ) ; for ( int i = 1 ; i < array . length ; i ++ ) { sb . append ( c ) ; ...
convert a string array to string list
22,836
public static String arrayToList ( Array array , String delimiter ) throws PageException { if ( array . size ( ) == 0 ) return "" ; StringBuilder sb = new StringBuilder ( Caster . toString ( array . get ( 1 , "" ) ) ) ; int len = array . size ( ) ; for ( int i = 2 ; i <= len ; i ++ ) { sb . append ( delimiter ) ; sb . ...
convert Array Object to string list
22,837
public static String [ ] trim ( String [ ] array ) { int from = 0 ; int to = 0 ; for ( int i = 0 ; i < array . length ; i ++ ) { from = i ; if ( array [ i ] . length ( ) != 0 ) break ; } for ( int i = array . length - 1 ; i >= 0 ; i -- ) { to = i ; if ( array [ i ] . length ( ) != 0 ) break ; } int newLen = to - from +...
trims a string array removes all empty array positions at the start and the end of the array
22,838
public static String [ ] toStringArrayTrim ( Array array ) throws PageException { String [ ] arr = new String [ array . size ( ) ] ; for ( int i = 0 ; i < arr . length ; i ++ ) { arr [ i ] = Caster . toString ( array . get ( i + 1 , "" ) ) . trim ( ) ; } return arr ; }
cast a Object Array to a String Array and trim all values
22,839
public static String first ( String list , String delimiter ) { return first ( list , delimiter , true , 1 ) ; }
return first element of the list
22,840
public static String getAt ( String list , String delimiter , int position , boolean ignoreEmpty , String defaultValue ) { if ( delimiter . length ( ) == 1 ) return getAt ( list , delimiter . charAt ( 0 ) , position , ignoreEmpty , defaultValue ) ; int len = list . length ( ) ; if ( len == 0 ) return defaultValue ; int...
gets a value from list
22,841
public static String getAt ( String list , char delimiter , int position , boolean ignoreEmpty , String defaultValue ) { int len = list . length ( ) ; if ( len == 0 ) return defaultValue ; int last = - 1 ; int count = - 1 ; for ( int i = 0 ; i < len ; i ++ ) { if ( list . charAt ( i ) == delimiter ) { if ( ignoreEmpty ...
get a elemnt at a specified position in list
22,842
public static int getDelimIndex ( StringBuilder sb , int itemPos , char [ ] delims , boolean ignoreEmpty ) { if ( StringUtil . isEmpty ( sb ) ) return - 1 ; int curr = - 1 , listIndex = 0 ; int len = sb . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( contains ( delims , sb . charAt ( i ) ) ) { curr = i ; if ( ...
returns the 0 - based delimiter position for the specified item
22,843
protected Data init ( Data data ) { if ( JSON_ARRAY == null ) JSON_ARRAY = getFLF ( data , "_literalArray" ) ; if ( JSON_STRUCT == null ) JSON_STRUCT = getFLF ( data , "_literalStruct" ) ; if ( GET_STATIC_SCOPE == null ) GET_STATIC_SCOPE = getFLF ( data , "_getStaticScope" ) ; if ( GET_SUPER_STATIC_SCOPE == null ) GET_...
Initialmethode wird aufgerufen um den internen Zustand des Objektes zu setzten .
22,844
public static boolean verify ( String host , String username , String password , int port ) throws SMTPException { try { return _verify ( host , username , password , port ) ; } catch ( MessagingException e ) { if ( ! StringUtil . isEmpty ( username ) ) { try { _verify ( host , null , null , port ) ; throw new SMTPExce...
verify mail server
22,845
protected ConfigWebImpl getConfigWebImpl ( String realpath ) { Iterator < String > it = initContextes . keySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { ConfigWebImpl cw = ( ( CFMLFactoryImpl ) initContextes . get ( it . next ( ) ) ) . getConfigWebImpl ( ) ; if ( ReqRspUtil . getRootPath ( cw . getServletContex...
returns CongigWeb Implementtion
22,846
protected void fillDecoded ( URLItem [ ] raw , String encoding , boolean scriptProteced , boolean sameAsArray ) throws UnsupportedEncodingException { clear ( ) ; String name , value ; for ( int i = 0 ; i < raw . length ; i ++ ) { name = raw [ i ] . getName ( ) ; value = raw [ i ] . getValue ( ) ; if ( raw [ i ] . isUrl...
fill th data from given strut and decode it
22,847
public void setType ( String type ) throws ApplicationException { if ( StringUtil . isEmpty ( type , true ) ) return ; type = type . toLowerCase ( ) . trim ( ) ; if ( type . equals ( "url" ) ) param . setType ( HttpParamBean . TYPE_URL ) ; else if ( type . equals ( "formfield" ) || type . equals ( "form" ) ) param . se...
set the value type The transaction type .
22,848
public Object getValue ( Query qr , int row ) throws PageException { if ( col == null ) col = qr . getColumn ( getColumn ( ) ) ; return QueryUtil . getValue ( col , row ) ; }
MUST hanle null correctly
22,849
public static Tag getParentTag ( Tag tag ) { Statement p = tag . getParent ( ) ; if ( p == null ) return null ; p = p . getParent ( ) ; if ( p instanceof Tag ) return ( Tag ) p ; return null ; }
Gibt das uebergeordnete CFXD Tag Element zurueck falls dies nicht existiert wird null zurueckgegeben .
22,850
public static boolean hasSisterTagAfter ( Tag tag , String nameToFind ) { Body body = ( Body ) tag . getParent ( ) ; List < Statement > stats = body . getStatements ( ) ; Iterator < Statement > it = stats . iterator ( ) ; Statement other ; boolean isAfter = false ; while ( it . hasNext ( ) ) { other = it . next ( ) ; i...
Prueft ob das das angegebene Tag in der gleichen Ebene nach dem angegebenen Tag vorkommt .
22,851
public static void remove ( Tag tag ) { Body body = ( Body ) tag . getParent ( ) ; body . getStatements ( ) . remove ( tag ) ; }
remove this tag from his parent body
22,852
public static void replace ( Tag src , Tag trg , boolean moveBody ) { trg . setParent ( src . getParent ( ) ) ; Body p = ( Body ) src . getParent ( ) ; List < Statement > stats = p . getStatements ( ) ; Iterator < Statement > it = stats . iterator ( ) ; Statement stat ; int count = 0 ; while ( it . hasNext ( ) ) { stat...
replace src with trg
22,853
public static Type toValueType ( Type type ) { if ( type == Types . BYTE ) return Types . BYTE_VALUE ; if ( type == Types . BOOLEAN ) return Types . BOOLEAN_VALUE ; if ( type == Types . CHARACTER ) return Types . CHAR ; if ( type == Types . DOUBLE ) return Types . DOUBLE_VALUE ; if ( type == Types . FLOAT ) return Type...
return value type only when there is one
22,854
private void _serializeDate ( Date date , StringBuilder sb ) throws ConverterException { _serializeDateTime ( new DateTimeImpl ( date ) , sb ) ; }
serialize a Date
22,855
public String serialize ( Object object ) throws ConverterException { deep = 0 ; StringBuilder sb = new StringBuilder ( ) ; _serialize ( object , sb , new HashSet < Object > ( ) ) ; return sb . toString ( ) ; }
serialize a Object to his literal Format
22,856
public void setDatasource ( Object datasource ) throws PageException , ClassException , BundleException { if ( datasource == null ) return ; data . rawDatasource = datasource ; data . datasource = toDatasource ( pageContext , datasource ) ; }
set the value datasource The name of the data source from which this query should retrieve data .
22,857
public static boolean call ( PageContext pc , String type , Object value ) throws ExpressionException { type = type . trim ( ) ; if ( "range" . equalsIgnoreCase ( type ) ) throw new FunctionException ( pc , "isValid" , 1 , "type" , "for [range] you have to define a min and max value" ) ; if ( "regex" . equalsIgnoreCase...
check for many diff types
22,858
public static final void merge ( InputStream in1 , InputStream in2 , OutputStream out , boolean closeIS1 , boolean closeIS2 , boolean closeOS ) throws IOException { try { merge ( in1 , in2 , out , 0xffff ) ; } finally { if ( closeIS1 ) closeEL ( in1 ) ; if ( closeIS2 ) closeEL ( in2 ) ; if ( closeOS ) closeEL ( out ) ;...
copy a inputstream to a outputstream
22,859
public void copy ( File in , File out ) throws IOException { InputStream is = null ; OutputStream os = null ; try { is = new BufferedFileInputStream ( in ) ; os = new BufferedFileOutputStream ( out ) ; } catch ( IOException ioe ) { closeEL ( is , os ) ; throw ioe ; } copy ( is , os , true , true ) ; }
copy content of in file to out File
22,860
public static void closeEL ( InputStream is ) { try { if ( is != null ) is . close ( ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; } }
close inputstream without a Exception
22,861
public static void closeEL ( OutputStream os ) { try { if ( os != null ) os . close ( ) ; } catch ( Throwable t ) { ExceptionUtil . rethrowIfNecessary ( t ) ; } }
close outputstream without a Exception
22,862
public static void closeEL ( Reader r ) { try { if ( r != null ) r . close ( ) ; } catch ( Throwable e ) { ExceptionUtil . rethrowIfNecessary ( e ) ; } }
close Reader without a Exception
22,863
public static void closeEL ( Closeable c ) { try { if ( c != null ) c . close ( ) ; } catch ( Throwable e ) { ExceptionUtil . rethrowIfNecessary ( e ) ; } }
close Closeable without a Exception
22,864
public static void closeEL ( Object obj ) { if ( obj instanceof InputStream ) IOUtil . closeEL ( ( InputStream ) obj ) ; else if ( obj instanceof OutputStream ) IOUtil . closeEL ( ( OutputStream ) obj ) ; else if ( obj instanceof Writer ) IOUtil . closeEL ( ( Writer ) obj ) ; else if ( obj instanceof Reader ) IOUtil . ...
call close method from any Object with a close method .
22,865
public static void checkEncoding ( String encoding ) throws IOException { try { URLEncoder . encode ( "" , encoding ) ; } catch ( UnsupportedEncodingException e ) { throw new IOException ( "invalid encoding [" + encoding + "]" ) ; } }
check if given encoding is ok
22,866
public static boolean isValidEmail ( Object value ) { InternetAddress addr = parseEmail ( value , null ) ; if ( addr != null ) { String address = addr . getAddress ( ) ; if ( address . contains ( ".." ) ) return false ; int pos = address . indexOf ( '@' ) ; if ( pos < 1 || pos == address . length ( ) - 1 ) return false...
returns true if the passed value is a in valid email address format
22,867
public static InternetAddress parseEmail ( Object value , InternetAddress defaultValue ) { String str = Caster . toString ( value , "" ) ; if ( str . indexOf ( '@' ) > - 1 ) { try { str = fixIDN ( str ) ; InternetAddress addr = new InternetAddress ( str ) ; return addr ; } catch ( AddressException ex ) { } } return def...
returns an InternetAddress object or null if the parsing fails . to be be used in multiple places .
22,868
public static String fixIDN ( String addr ) { int pos = addr . indexOf ( '@' ) ; if ( pos > 0 && pos < addr . length ( ) - 1 ) { String domain = addr . substring ( pos + 1 ) ; if ( ! StringUtil . isAscii ( domain ) ) { domain = IDN . toASCII ( domain ) ; return addr . substring ( 0 , pos ) + "@" + domain ; } } return a...
converts IDN to ASCII if needed
22,869
public void reuse ( Tag tag ) { tag . release ( ) ; Queue < Tag > queue = getQueue ( tag . getClass ( ) . getName ( ) ) ; queue . add ( tag ) ; }
free a tag for reusing
22,870
public static String executeQuery ( String [ ] cmd ) throws IOException , InterruptedException { return Command . execute ( cmd ) . getOutput ( ) ; }
execute a String query on command line
22,871
public static RegistryEntry getValue ( String branch , String entry , short type ) throws RegistryException , IOException , InterruptedException { String [ ] cmd = new String [ ] { "reg" , "query" , cleanBrunch ( branch ) , "/v" , entry } ; RegistryEntry [ ] rst = filter ( executeQuery ( cmd ) , branch , type ) ; if ( ...
gets a single value form the registry
22,872
public static RegistryEntry [ ] getValues ( String branch , short type ) throws RegistryException , IOException , InterruptedException { String [ ] cmd = new String [ ] { "reg" , "query" , branch } ; return filter ( executeQuery ( cmd ) , cleanBrunch ( branch ) , type ) ; }
gets all entries of one branch
22,873
public static void setValue ( String branch , String entry , short type , String value ) throws RegistryException , IOException , InterruptedException { if ( type == RegistryEntry . TYPE_KEY ) { String fullKey = ListUtil . trim ( branch , "\\" ) + "\\" + ListUtil . trim ( entry , "\\" ) ; String [ ] cmd = new String [ ...
writes a value to registry
22,874
public static void deleteValue ( String branch , String entry ) throws IOException , InterruptedException { if ( entry == null ) { String [ ] cmd = new String [ ] { "reg" , "delete" , cleanBrunch ( branch ) , "/f" } ; executeQuery ( cmd ) ; } else { String [ ] cmd = new String [ ] { "reg" , "delete" , cleanBrunch ( bra...
deletes a value or a key
22,875
private static RegistryEntry [ ] filter ( String string , String branch , short type ) throws RegistryException { branch = ListUtil . trim ( branch , "\\" ) ; StringBuffer result = new StringBuffer ( ) ; ArrayList array = new ArrayList ( ) ; String [ ] arr = string . split ( "\n" ) ; for ( int i = 0 ; i < arr . length ...
filter registry entries from the raw result
22,876
public Object touch ( int row ) { if ( row < 1 || row > size ) return NullSupportHelper . full ( ) ? null : "" ; Object o = data [ row - 1 ] ; if ( o != null ) return o ; return setEL ( row , new StructImpl ( ) ) ; }
touch the given line on the column at given row
22,877
public static Object toCFTypex ( SQLItem item ) throws PageException { try { return _toCFTypex ( item ) ; } catch ( PageException e ) { if ( item . isNulls ( ) ) return item . getValue ( ) ; throw e ; } }
cast a Value to a correspondance CF Type
22,878
public static String toStringType ( int type , String defaultValue ) { switch ( type ) { case Types . ARRAY : return "CF_SQL_ARRAY" ; case Types . BIGINT : return "CF_SQL_BIGINT" ; case Types . BINARY : return "CF_SQL_BINARY" ; case Types . BIT : return "CF_SQL_BIT" ; case Types . BOOLEAN : return "CF_SQL_BOOLEAN" ; ca...
returns CF SQL Type as String
22,879
public void setMailLog ( String logFile , String level ) throws PageException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_MAIL ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update mail server settings" ) ; ConfigWebUtil . getFile ( config...
sets Mail Logger to Config
22,880
public void setMailSpoolEnable ( Boolean spoolEnable ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_MAIL ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update mail server settings" ) ; Element mail = _getRootElement...
sets if spool is enable or not
22,881
public void setMailTimeout ( Integer timeout ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_MAIL ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update mail server settings" ) ; Element mail = _getRootElement ( "mail...
sets the timeout for the spooler for one job
22,882
public void setMailDefaultCharset ( String charset ) throws PageException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_MAIL ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update mail server settings" ) ; if ( ! StringUtil . isEmpty ( charse...
sets the charset for the mail
22,883
public void updateMailServer ( int id , String hostName , String username , String password , int port , boolean tls , boolean ssl , long lifeTimeSpan , long idleTimeSpan , boolean reuseConnections ) throws PageException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager ....
insert or update a mailserver on system
22,884
public void removeMailServer ( String hostName , String username ) throws SecurityException { checkWriteAccess ( ) ; Element mail = _getRootElement ( "mail" ) ; Element [ ] children = XMLConfigWebFactory . getChildren ( mail , "server" ) ; String _hostName , _username ; if ( children . length > 0 ) { for ( int i = 0 ; ...
removes a mailserver from system
22,885
public void updateMapping ( String virtual , String physical , String archive , String primary , short inspect , boolean toplevel , int listenerMode , int listenerType , boolean readOnly ) throws ExpressionException , SecurityException { checkWriteAccess ( ) ; _updateMapping ( virtual , physical , archive , primary , i...
insert or update a mapping on system
22,886
public void removeCustomTag ( String virtual ) throws SecurityException { checkWriteAccess ( ) ; Element mappings = _getRootElement ( "custom-tag" ) ; Element [ ] children = XMLConfigWebFactory . getChildren ( mappings , "mapping" ) ; for ( int i = 0 ; i < children . length ; i ++ ) { if ( virtual . equals ( createVirt...
delete a customtagmapping on system
22,887
public void updateCustomTag ( String virtual , String physical , String archive , String primary , short inspect ) throws ExpressionException , SecurityException { checkWriteAccess ( ) ; _updateCustomTag ( virtual , physical , archive , primary , inspect ) ; }
insert or update a mapping for Custom Tag
22,888
public void updateJavaCFX ( String name , ClassDefinition cd ) throws PageException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_CFX_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to change cfx settings" ) ; if ( name == null || name ....
insert or update a Java CFX Tag
22,889
public static boolean fixSalt ( Document doc ) { Element root = doc . getDocumentElement ( ) ; String salt = root . getAttribute ( "salt" ) ; if ( StringUtil . isEmpty ( salt , true ) || ! Decision . isUUId ( salt ) ) { root . setAttribute ( "salt" , CreateUUID . invoke ( ) ) ; return true ; } return false ; }
make sure every context has a salt
22,890
public void removeCFX ( String name ) throws ExpressionException , SecurityException { checkWriteAccess ( ) ; if ( name == null || name . length ( ) == 0 ) throw new ExpressionException ( "name for CFX Tag can be a empty value" ) ; renameOldstyleCFX ( ) ; Element mappings = _getRootElement ( "ext-tags" ) ; Element [ ] ...
remove a CFX Tag
22,891
public void removeDataSource ( String name ) throws ExpressionException , SecurityException { checkWriteAccess ( ) ; if ( name == null || name . length ( ) == 0 ) throw new ExpressionException ( "name for Datasource Connection can be a empty value" ) ; Element datasources = _getRootElement ( "data-sources" ) ; Element ...
remove a DataSource Connection
22,892
public void updatePSQ ( Boolean psq ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_DATASOURCE ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update datsource connections" ) ; Element datasources = _getRootElement ( ...
update PSQ State
22,893
public void updateAllowImplicidQueryCall ( Boolean allow ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRootElemen...
sets if allowed implicid query call
22,894
public void updateApplicationTimeout ( TimeSpan span ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRootElement ( ...
updates request timeout value
22,895
public void updateSessionManagement ( Boolean sessionManagement ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRoo...
enable or desable session management
22,896
public void updateClientManagement ( Boolean clientManagement ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRootE...
enable or desable client management
22,897
public void updateClientCookies ( Boolean clientCookies ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRootElement...
set if client cookies are enabled or not
22,898
public void updateMode ( Boolean developmode ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element mode = _getRootElement ( "mode" ) ...
set if it s develop mode or not
22,899
public void updateDomaincookies ( Boolean domainCookies ) throws SecurityException { checkWriteAccess ( ) ; boolean hasAccess = ConfigWebUtil . hasAccess ( config , SecurityManager . TYPE_SETTING ) ; if ( ! hasAccess ) throw new SecurityException ( "no access to update scope setting" ) ; Element scope = _getRootElement...
set if domain cookies are enabled or not