idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
14,800 | public void addBrowserProperties ( HttpServletRequest req , PropertyOwner servletTask ) { String strBrowser = this . getBrowser ( req ) ; String strOS = this . getOS ( req ) ; servletTask . setProperty ( DBParams . BROWSER , strBrowser ) ; servletTask . setProperty ( DBParams . OS , strOS ) ; } | Add the browser properties to this servlet task . |
14,801 | public UserSettingJdo newLocalDate ( final String user , final String key , final String description , final LocalDate value ) { return newSetting ( user , key , description , SettingType . LOCAL_DATE , value . toString ( SettingAbstract . DATE_FORMATTER ) ) ; } | region > newLocalDate |
14,802 | protected void enqueueNotification ( final Notification not ) { not . lastRun = System . currentTimeMillis ( ) ; final SubscriptionSummary summary = postNotification ( not . subscriber , not . mimeType , not . payload ) ; not . callback . onSummaryInfo ( summary ) ; } | A blocking call that performs a notification . If there are pending retries that are older than two minutes old they will be retried before the method returns . |
14,803 | public void printHtmlHeaderArea ( PrintWriter out ) { ClassInfoModel classInfo = ( ( HelpScreen ) this . getScreenField ( ) ) . getClassInfo ( ) ; if ( classInfo != null ) if ( classInfo . isValidRecord ( ) ) { String strHeader = " <title>Technical Help Screen - " + Utility . encodeXML ( classInfo . getClassDesc ( ) ) ... | Get the top menu . |
14,804 | public BaseMessage processMessage ( BaseMessage message ) { RunRemoteProcessMessageData runRemoteProcessMessageData = ( RunRemoteProcessMessageData ) message . getMessageDataDesc ( null ) ; if ( runRemoteProcessMessageData == null ) message . addMessageDataDesc ( runRemoteProcessMessageData = new RunRemoteProcessMessag... | Process this message and return a reply . |
14,805 | public void createCustomArchive ( String destArchivePath , String homePath , String templateArchivePath , String templateFilename ) { Record recUser = this . getMainRecord ( ) ; Map < String , String > map = new HashMap < String , String > ( ) ; map . put ( "${email}" , recUser . getField ( UserInfo . USER_NAME ) . toS... | CreateCustomArchive Method . |
14,806 | public boolean setMainKey ( boolean bDisplayOption , Boolean boolSetModified , boolean bSetIfModified ) { super . setMainKey ( bDisplayOption , boolSetModified , bSetIfModified ) ; boolean bNonNulls = false ; if ( m_fldThisFile != null ) { m_fldThisFile . setString ( m_strFirst , bDisplayOption , DBConstants . READ_MOV... | Setup the target key field to the initial string values . |
14,807 | public void update ( long time , double latitude , double longitude , double rateOfTurn ) { if ( strat == Strategy . LONG ) { throw new IllegalStateException ( "mixing short/long update" ) ; } strat = Strategy . SHORT ; lock . lock ( ) ; try { if ( prevTime > 0 ) { this . time = time ; this . latitude = latitude ; this... | Updates values and calculates speed and bearing . |
14,808 | public void update ( long time , double latitude , double longitude , double speed , double bearing , double rateOfTurn ) { if ( strat == Strategy . SHORT ) { throw new IllegalStateException ( "mixing short/long update" ) ; } strat = Strategy . LONG ; lock . lock ( ) ; try { this . time = time ; this . latitude = latit... | Updates values . |
14,809 | public final double estimatedLatitude ( long et ) { et = correctedTime ( et ) ; lock . lock ( ) ; try { calc ( ) ; if ( rateOfTurn == 0 ) { double dist = calcDist ( et ) ; return latitude + deltaLatitude ( dist , bearing ) ; } else { double deg = calcDeg ( et ) ; return centerLatitude + deltaLatitude ( radius , deg ) ;... | Returns estimated latitude at et |
14,810 | public final double estimatedLongitude ( long et ) { et = correctedTime ( et ) ; lock . lock ( ) ; try { calc ( ) ; if ( rateOfTurn == 0 ) { double dist = calcDist ( et ) ; return addLongitude ( longitude , deltaLongitude ( latitude , dist , bearing ) ) ; } else { double deg = calcDeg ( et ) ; return addLongitude ( cen... | Return estimated longitude at et |
14,811 | public final Location estimatedLocation ( long et ) { lock . lock ( ) ; try { return new Location ( estimatedLatitude ( et ) , estimatedLongitude ( et ) ) ; } finally { lock . unlock ( ) ; } } | Using this method protects from parallel updates |
14,812 | private static DatagramPacket optionallyCopyData ( DatagramPacket packet ) { if ( packet != null ) { packet . setData ( packet . getData ( ) . clone ( ) , packet . getOffset ( ) , packet . getLength ( ) ) ; } return packet ; } | Makes a copy of the data in the packet to make the packet safe to store for longer periods of time . |
14,813 | public void sendMessage ( Message message ) throws RemoteException { BaseTransport transport = this . createProxyTransport ( SEND_MESSAGE ) ; transport . addParam ( MESSAGE , message ) ; transport . sendMessageAndGetReply ( ) ; } | Send a remote message . |
14,814 | public static < I > JMSubscriber < I > getSOPLSubscriber ( Function < I , ? > transformFunction ) { return build ( o -> System . out . println ( transformFunction . apply ( o ) ) ) ; } | Gets sopl subscriber . |
14,815 | public static < I > JMSubscriber < I > getJsonStringSOPLSubscriber ( Function < I , ? > transformFunction ) { return getSOPLSubscriber ( o -> JMJson . toJsonString ( transformFunction . apply ( o ) ) ) ; } | Gets json string sopl subscriber . |
14,816 | public static < I > JMFileSubscriber < I > buildJsonStringFileSubscriber ( String filePath , Function < Object , String > toStringFunction ) { return new JMFileSubscriber < > ( filePath , toStringFunction ) ; } | Build json string file subscriber jm file subscriber . |
14,817 | private File findFile ( String fileName , List path ) { final String methodName = "findFile(): " ; String fileSeparator = System . getProperty ( "file.separator" ) ; for ( Iterator i = path . iterator ( ) ; i . hasNext ( ) ; ) { String directory = ( String ) i . next ( ) ; if ( ! directory . endsWith ( fileSeparator ) ... | Finds a file if it exists in a list of provided paths |
14,818 | public BaseField getCodeField ( ) { Record record = this . getOwner ( ) ; if ( m_iCodeField != null ) return record . getField ( m_iCodeField ) ; else return record . getKeyArea ( record . getCodeKeyArea ( ) ) . getField ( DBConstants . MAIN_KEY_FIELD ) ; } | Get the code field . |
14,819 | public int moveIDToCodeField ( ) { if ( this . getCodeField ( ) . isNull ( ) ) return getCodeField ( ) . moveFieldToThis ( ( BaseField ) this . getOwner ( ) . getCounterField ( ) ) ; else return DBConstants . NORMAL_RETURN ; } | Move the ID field to the code field . |
14,820 | public String tabsToSpaces ( String string ) { int iOffset = 0 ; for ( int i = 0 ; i < string . length ( ) ; i ++ ) { if ( string . charAt ( i ) == '\n' ) iOffset = i + 1 ; if ( string . charAt ( i ) == '\t' ) { int iSpaces = ( i - iOffset ) % 4 ; if ( iSpaces == 0 ) iSpaces = 4 ; string = string . substring ( 0 , i ) ... | Convert the tabs to spaces . |
14,821 | public void setSampleStyle ( ) { Color colorBackground = ScreenUtil . getColor ( ScreenUtil . BACKGROUND_COLOR , null , properties ) ; Color colorControl = ScreenUtil . getColor ( ScreenUtil . CONTROL_COLOR , null , properties ) ; Color colorText = ScreenUtil . getColor ( ScreenUtil . TEXT_COLOR , null , properties ) ;... | Handle the button actions . |
14,822 | private JAXBContext getJAXBContext ( Class < ? extends CCBAPIResponse > responseClass ) { if ( ! jaxbContextCache . containsKey ( responseClass ) ) { synchronized ( jaxbContextCache ) { if ( ! jaxbContextCache . containsKey ( responseClass ) ) { try { final JAXBContext jaxbContext = JAXBContext . newInstance ( response... | Find or create the JAXBContext for a CCBAPIResponse implementation . |
14,823 | public int fieldChanged ( boolean bDisplayOption , int iMoveMode ) { if ( m_bSetModified ) m_fldTarget . setModified ( true ) ; return m_fldTarget . handleFieldChanged ( bDisplayOption , iMoveMode ) ; } | The Field has Changed . Initialize the target field also . |
14,824 | public Object convert ( String property , Object value ) { if ( value == null ) { return defaultMap . get ( property ) ; } Class < ? > type = getType ( property ) ; if ( type == null ) { throw new IllegalArgumentException ( property + " unknown" ) ; } return ConvertUtil . convertTo ( value , type ) ; } | Tries to convert object to model type |
14,825 | public DataObjectModel view ( int from ) { DataObjectModel view = clone ( ) ; view . propertyList = propertyList . subList ( from , propertyList . size ( ) ) ; return view ; } | Returns a clone of this model where only propertyList starting from from are present . |
14,826 | public DataObjectModel view ( String ... properties ) { DataObjectModel view = clone ( ) ; view . propertyList = new ArrayList < String > ( ) ; for ( String property : properties ) { view . propertyList . add ( property ) ; } return view ; } | Returns a clone of this model where only listed propertyList are present . |
14,827 | public DataObjectModel view ( Collection < ? extends DataObject > dos ) { DataObjectModel view = clone ( ) ; view . propertyList = new ArrayList < String > ( ) ; Set < String > propertySet = new HashSet < String > ( ) ; for ( DataObject dob : dos ) { for ( String property : propertyList ) { Object value = dob . get ( p... | Returns a clone of this model where only properties that have values are present |
14,828 | public DataObjectModel hide ( String ... properties ) { DataObjectModel view = clone ( ) ; view . propertyList = new ArrayList < String > ( ) ; view . propertyList . addAll ( this . propertyList ) ; for ( String property : properties ) { view . propertyList . remove ( property ) ; } return view ; } | Returns a clone of model where listed propertyList are hidden ; |
14,829 | protected final JButton getButtonOK ( ) { if ( buttonOK == null ) { buttonOK = new JButton ( ) ; buttonOK . setText ( "OK" ) ; buttonOK . setPreferredSize ( new Dimension ( 80 , 26 ) ) ; buttonOK . addActionListener ( new ActionListener ( ) { public void actionPerformed ( final ActionEvent e ) { if ( destDirSelector !=... | Returns the OK button for usage as default button . |
14,830 | protected final JButton getButtonCancel ( ) { if ( buttonCancel == null ) { buttonCancel = new JButton ( ) ; buttonCancel . setText ( "Cancel" ) ; buttonCancel . setPreferredSize ( new Dimension ( 80 , 26 ) ) ; buttonCancel . addActionListener ( new ActionListener ( ) { public void actionPerformed ( final ActionEvent e... | Returns the Cancel button for usage as default button . |
14,831 | public void open ( URL eventStreamURL ) throws IOException { log . info ( "Connecting to event stream |%s|." , eventStreamURL ) ; connection = ( HttpURLConnection ) eventStreamURL . openConnection ( ) ; connection . setConnectTimeout ( CONNECTION_TIMEOUT ) ; connection . setReadTimeout ( READ_TIMEOUT ) ; connection . s... | Opens connection with given event stream and initialize internal input stream . Because this method involve networking and server side processes it is not instant . Anyway usually cannot exceed one second or two . |
14,832 | public void close ( ) throws InterruptedException { assert connection != null ; if ( connection != null ) { Files . close ( inputStream ) ; if ( thread . isAlive ( ) ) { synchronized ( this ) { if ( thread . isAlive ( ) ) { thread . wait ( THREAD_STOP_TIMEOUT ) ; } } } } } | Close this event stream client . This method stops receiving thread and closes internal input stream . It is not necessary if end of event stream is controlled by server side in with case this event stream client does auto - close . |
14,833 | public PropertyOwner retrieveUserProperties ( ) { Record record = this . getOwner ( ) . getRecord ( ) ; ComponentParent screen = null ; if ( record . getRecordOwner ( ) instanceof ComponentParent ) screen = ( ComponentParent ) record . getRecordOwner ( ) ; if ( screen != null ) return screen . retrieveUserProperties ( ... | Get the owner of this property key . The registration key is the screen s key . The property key is the field name . |
14,834 | private void select ( Type type , Object value ) { assert value != null ; reloadElement ( ) ; this . selectByType ( type , value ) ; } | this private method try to search the value of the select for n seconds specified by TIMEOUT static variable . The coerence if the data passed is or isn t the correct value is responsability of the test developer . |
14,835 | public boolean getState ( ) { if ( this . getData ( ) == null ) return m_bTrueIfNull ; int fieldValue = ( int ) this . getValue ( ) ; boolean returnValue = false ; if ( ( fieldValue & ( 1 << m_iBitNumber ) ) != 0 ) returnValue = true ; if ( m_bTrueIfMatch ) return returnValue ; else return ! returnValue ; } | For binary fields return the current state . Gets the state of the target bit . |
14,836 | public int setState ( boolean bState , boolean bDisplayOption , int iMoveMode ) { int iFieldValue = ( int ) this . getValue ( ) ; if ( ! m_bTrueIfMatch ) bState = ! bState ; if ( bState ) iFieldValue |= ( 1 << m_iBitNumber ) ; else iFieldValue &= ~ ( 1 << m_iBitNumber ) ; return this . setValue ( iFieldValue , bDisplay... | For binary fields set the current state . Sets the target bit to the state . |
14,837 | private static InputStream findStream ( String filename ) { InputStream streamOnClass = JDefaultAddress . class . getResourceAsStream ( filename ) ; if ( streamOnClass != null ) { return streamOnClass ; } InputStream is = JDefaultAddress . class . getClassLoader ( ) . getResourceAsStream ( filename ) ; return is ; } | Finds the InputStream of a file in a Jar |
14,838 | protected static Object fetch ( String key ) { List valuesArray = ( List ) fetchObject ( key ) ; return valuesArray . get ( RandomUtils . nextInt ( valuesArray . size ( ) ) ) ; } | Fetches a random Object from the dictionary based on a key |
14,839 | protected static String fetchList ( String key ) { List valuesArray = ( List ) fetchObject ( key ) ; List < String > stringList1 = ( List < String > ) valuesArray . get ( 0 ) ; List < String > stringList2 = ( List < String > ) valuesArray . get ( 1 ) ; List < String > stringList3 = ( List < String > ) valuesArray . get... | Fetches a List of of Values |
14,840 | protected static String fetchString ( String key ) { List < String > stringList = ( List < String > ) fetchObject ( key ) ; return stringList . get ( RandomUtils . nextInt ( stringList . size ( ) ) ) ; } | Fetches a value |
14,841 | protected static Object fetchObject ( String key ) { String [ ] path = key . split ( "\\." ) ; Object currentValue = fakeValuesMap ; for ( String pathSection : path ) { currentValue = ( ( Map < String , Object > ) currentValue ) . get ( pathSection ) ; } return currentValue ; } | Finds map of values based on a key |
14,842 | protected static String letterify ( String letterString ) { StringBuffer sb = new StringBuffer ( ) ; for ( int i = 0 ; i < letterString . length ( ) ; i ++ ) { if ( letterString . charAt ( i ) == '?' ) { sb . append ( ( char ) ( 97 + RandomUtils . nextInt ( 26 ) ) ) ; } else { sb . append ( letterString . charAt ( i ) ... | Replace ? in a string with random letters |
14,843 | protected static String parseFoundKey ( String value ) { String regex = "#\\{([A-Za-z]+\\.)?([^\\}]+)\\}" ; Pattern p = Pattern . compile ( regex ) ; Matcher matcher = p . matcher ( value ) ; while ( matcher . find ( ) ) { String keyMatched = matcher . group ( ) . trim ( ) ; String trimmedKey = StringUtils . substring ... | resolves an embedded key |
14,844 | public void run ( ) { if ( ! EventQueue . isDispatchThread ( ) ) { if ( ! m_syncPage . isPaintCalled ( ) ) { synchronized ( m_syncPage ) { while ( ! m_syncPage . isPaintCalled ( ) ) { try { m_syncPage . wait ( ) ; } catch ( InterruptedException e ) { } } } } synchronized ( m_syncPage ) { m_syncPage . setPaintCalled ( f... | Make sure everything goes in the right order . |
14,845 | public static boolean validatePassword ( BrokerSession session , String password ) { password = encrypt ( password , session . getServerCaps ( ) . getCipherKey ( ) ) ; return session . callRPCBool ( "RGCWFUSR VALIDPSW" , password ) ; } | Validates the current user s password . |
14,846 | public static String changePassword ( BrokerSession session , String oldPassword , String newPassword ) { String cipherKey = session . getServerCaps ( ) . getCipherKey ( ) ; String result = session . callRPC ( "RGNETBRP CVC" , encrypt ( oldPassword , cipherKey ) , encrypt ( newPassword , cipherKey ) ) ; return result .... | Change a password . |
14,847 | protected static String encrypt ( String value , String cipherKey ) { String [ ] cipher = CipherRegistry . getCipher ( cipherKey ) ; int associatorIndex = randomIndex ( cipher . length ) ; int identifierIndex ; do { identifierIndex = randomIndex ( cipher . length ) ; } while ( associatorIndex == identifierIndex ) ; ret... | Encrypt a string value . |
14,848 | protected static final String decrypt ( String value , String cipherKey ) { int len = value == null ? 0 : value . length ( ) ; if ( len < 3 ) { return "" ; } int identifierIndex = value . charAt ( 0 ) - 32 ; int associatorIndex = value . charAt ( len - 1 ) - 32 ; String [ ] cipher = CipherRegistry . getCipher ( cipherK... | Decrypt a string value . |
14,849 | protected void processConditions ( final BuildData buildData , final SpecTopic specTopic , final Document doc ) { if ( buildData . getContentSpec ( ) . getPublicanCfg ( ) == null || ! buildData . getContentSpec ( ) . getPublicanCfg ( ) . contains ( "condition:" ) ) { super . processConditions ( buildData , specTopic , ... | Checks if the conditional pass should be done by checking to see if the publican . cfg has it s own condition set . If none are set then the conditions are processed . |
14,850 | private String applyPublicanCfgOverrides ( final BuildData buildData , final String publicanCfg ) { final Map < String , String > publicanCfgOverrides = buildData . getBuildOptions ( ) . getPublicanCfgOverrides ( ) ; String retValue = publicanCfg ; for ( final Map . Entry < String , String > publicanCfgOverrideEntry : ... | Applies custom user overrides to the publican . cfg file . |
14,851 | public StringBuffer addLinkTag ( StringBuffer sb ) { int iIndex = sb . lastIndexOf ( Utility . endTag ( this . getTableNames ( false ) ) ) ; if ( iIndex != - 1 ) { String strLink = Utility . encodeXML ( this . getLink ( ) ) ; String strHelpLink = strLink ; if ( strLink . indexOf ( '?' ) != - 1 ) strHelpLink = "?" + DBP... | Add a tag to this XML for the menu link . |
14,852 | public String getSubMenuXML ( ) { StringBuffer sbMenuArea = new StringBuffer ( ) ; if ( this . getEditMode ( ) == Constants . EDIT_CURRENT ) { if ( this . getField ( Menus . ICON_RESOURCE ) . isNull ( ) ) { String strIcon = this . getField ( Menus . TYPE ) . toString ( ) ; if ( strIcon . length ( ) > 0 ) strIcon = strI... | Get the XML for this menu item and it s sub - menus . |
14,853 | public String getSQLType ( boolean bIncludeLength , Map < String , Object > properties ) { String strType = ( String ) properties . get ( DBSQLTypes . FLOAT ) ; if ( strType == null ) strType = DBSQLTypes . FLOAT ; return strType ; } | Get the SQL type of this field . Typically FLOAT . |
14,854 | public void drawToImage ( String path ) { try { ImageOutputDisplay disp = new ImageOutputDisplay ( getPage ( ) . getWidth ( ) , getPage ( ) . getHeight ( ) ) ; disp . drawPage ( getPage ( ) ) ; disp . saveTo ( path ) ; } catch ( IOException e ) { log . error ( "Couldn't write to " + path + ": " + e . getMessage ( ) ) ;... | Draws the current page to an image file . |
14,855 | public void drawToImageWithAreas ( String path , String areaNames ) { try { ImageOutputDisplay disp = new ImageOutputDisplay ( getPage ( ) . getWidth ( ) , getPage ( ) . getHeight ( ) ) ; disp . drawPage ( getPage ( ) ) ; showAreas ( disp , getAreaTree ( ) . getRoot ( ) , areaNames ) ; disp . saveTo ( path ) ; } catch ... | Draws the page to an image file and marks selected areas in the image . |
14,856 | public void mergeSourceRecord ( Record recSource , Record recDest ) { try { boolean bFound = this . readDestRecord ( recSource , recDest ) ; if ( ! bFound ) recDest . addNew ( ) ; else recDest . edit ( ) ; this . mergeSourceData ( recSource , recDest , bFound ) ; if ( recDest . isModified ( ) ) { if ( recDest . getEdit... | MergeSourceRecord Method . |
14,857 | public void mergeSourceData ( Record recSource , Record recDest , boolean bFound ) { for ( int iFieldSeq = 0 ; iFieldSeq < recSource . getFieldCount ( ) ; iFieldSeq ++ ) { BaseField fldSource = recSource . getField ( iFieldSeq ) ; BaseField fldDest = recDest . getField ( fldSource . getFieldName ( ) ) ; if ( fldDest !=... | Merge this source record with the destination record . |
14,858 | public boolean readDestRecord ( FieldList recSource , Record recDest ) { FieldInfo fldSecond = recSource . getField ( "Name" ) ; if ( fldSecond == null ) fldSecond = recSource . getField ( "Description" ) ; if ( fldSecond == null ) return false ; recDest = BaseFixData . getRecordFromDescription ( fldSecond . toString (... | Given this source record read the destination record . |
14,859 | public List < String > getCss ( ) { return stream ( properties . getOrDefault ( "css" , "" ) . split ( "," ) ) . map ( String :: trim ) . filter ( x -> x . length ( ) > 0 ) . collect ( toList ( ) ) ; } | Get any CSS document URLs |
14,860 | public ApplicationSettingJdo newBoolean ( final String key , final String description , final Boolean value ) { return newSetting ( key , description , SettingType . BOOLEAN , Boolean . toString ( value != null && value ) ) ; } | region > newBoolean |
14,861 | public void untilTrue ( Predicate < SebContext > isTrue ) { super . until ( new com . google . common . base . Predicate < SebContext > ( ) { public boolean apply ( SebContext input ) { return isTrue . test ( input ) ; } } ) ; } | Until method using predicate functional interface . It solves ambiguity when using basic until method without typed parameter . |
14,862 | public < V > V untilValid ( Function < SebContext , V > isTrue ) { return super . until ( new com . google . common . base . Function < SebContext , V > ( ) { public V apply ( SebContext input ) { return isTrue . apply ( input ) ; } } ) ; } | Until method using function functional interface . It solves ambiguity when using basic until method without typed parameter . |
14,863 | public SebContextWait sleep ( ) { try { sleeper . sleep ( timeout ) ; return this ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; throw new WebDriverException ( e ) ; } } | Sleeps for defined timeout without checking for any condition . |
14,864 | public void freeAllSFields ( boolean bIncludeToolScreens ) { int iToolScreens = 0 ; while ( this . getSFieldCount ( ) > iToolScreens ) { ScreenField sField = this . getSField ( iToolScreens ) ; if ( ( ! bIncludeToolScreens ) && ( sField instanceof ToolScreen ) ) iToolScreens ++ ; else sField . free ( ) ; } } | Free all the child sFields . |
14,865 | public Record getRecord ( String strFileName ) { if ( m_screenParent != null ) return m_screenParent . getRecord ( strFileName ) ; else return null ; } | Lookup this record in this screen . |
14,866 | public boolean onAdd ( ) { Record record = this . getMainRecord ( ) ; if ( record == null ) return false ; try { if ( record . isModified ( false ) ) { if ( record . getEditMode ( ) == Constants . EDIT_IN_PROGRESS ) record . set ( ) ; else if ( record . getEditMode ( ) == Constants . EDIT_ADD ) record . add ( ) ; } rec... | Process the Add toolbar command . |
14,867 | public boolean onHelp ( int iOptions ) { String strPrevAction = this . getScreenURL ( ) ; if ( ( strPrevAction == null ) || ( strPrevAction . length ( ) == 0 ) ) return false ; if ( this . getProperty ( "displayInitialHelp" ) != null ) if ( ( this . getProperty ( "helplanguage" ) != null ) && ( this . getProperty ( "he... | Process the Help toolbar command . |
14,868 | public boolean onMove ( int nIDMoveCommand ) { Record record = this . getMainRecord ( ) ; if ( record == null ) return false ; try { if ( record . isModified ( false ) ) { if ( record . getEditMode ( ) == Constants . EDIT_IN_PROGRESS ) record . set ( ) ; else if ( record . getEditMode ( ) == Constants . EDIT_ADD ) reco... | Process the Move Commands . |
14,869 | public boolean onRefresh ( ) { Record record = this . getMainRecord ( ) ; if ( record == null ) return false ; try { if ( record . getEditMode ( ) == Constants . EDIT_IN_PROGRESS ) { if ( record . isRefreshedRecord ( ) ) return this . onDelete ( ) ; Object bookmark = record . getHandle ( DBConstants . BOOKMARK_HANDLE )... | Process the Refresh Command . |
14,870 | public String addURLParam ( String strOldURL , String strParam , String strData ) { return Utility . addURLParam ( strOldURL , strParam , strData ) ; } | Get the command string that will restore this screen . Override in Screen GridScreen MenuScreen . |
14,871 | public boolean onBack ( ) { BasePanel parent = this . getParentScreen ( ) ; if ( parent == null ) return false ; parent . popHistory ( 1 , false ) ; String strLastCommand = parent . popHistory ( 1 , false ) ; if ( strLastCommand != null ) { parent . pushHistory ( strLastCommand , false ) ; strLastCommand = parent . pop... | Process the Back toolbar command . |
14,872 | public boolean onHome ( ) { if ( ! ( this instanceof BaseScreen ) ) return false ; BasePanel screenParent = this . getParentScreen ( ) ; int count = 0 ; while ( screenParent . popHistory ( 1 , false ) != null ) { count ++ ; } count -- ; if ( count > 0 ) screenParent . popHistory ( count , true ) ; String strLastCommand... | Process the Home command . |
14,873 | public boolean removeSField ( ScreenField sField ) { boolean bFlag = false ; if ( m_SFieldList . contains ( sField ) ) { bFlag = m_SFieldList . removeElement ( sField ) ; if ( sField . getScreenFieldView ( ) != null ) if ( sField . getScreenFieldView ( ) . getControl ( ) != null ) sField . free ( ) ; } return bFlag ; } | Remove this screen field from this screen . |
14,874 | public ScreenField getSField ( int index ) { if ( ( index - DBConstants . MAIN_FIELD >= m_SFieldList . size ( ) ) || ( index < Constants . MAIN_FIELD ) ) return null ; try { return ( ScreenField ) m_SFieldList . elementAt ( index - Constants . MAIN_FIELD ) ; } catch ( ArrayIndexOutOfBoundsException e ) { } return null ... | Get the SField at this index . |
14,875 | public void selectField ( ScreenField sfCurrent , int iSelectField ) { ScreenField sField = this . getComponentAfter ( sfCurrent , iSelectField ) ; if ( sField != null ) sField . requestFocus ( ) ; } | Move the focus to the next logical field . |
14,876 | public ScreenField getComponentAfter ( ScreenField sfCurrent , int iSelectField ) { ScreenField m_ChildFocused = ( ScreenField ) sfCurrent ; if ( m_ChildFocused == null ) iSelectField = DBConstants . SELECT_FIRST_FIELD ; ScreenField sField = null ; ScreenField sPrevScreenField = null ; ScreenField sNextScreenField = nu... | Returns the Component that should receive the focus after aComponent . |
14,877 | public void setDefaultButton ( SBaseButton button ) { this . getScreenFieldView ( ) . setDefaultButton ( button == null ? null : button . getScreenFieldView ( ) ) ; } | Set the default button for this basepanel . |
14,878 | public static final < K , V > Stream < Entry < K , V > > stream ( K key , NavigableMap < K , V > map , boolean parallel ) { return StreamSupport . stream ( spliterator ( key , map ) , parallel ) ; } | Returns a stream that iterates all NavigableMap entries ascending starting from key and ending entry before key . |
14,879 | public static final < K , V > Spliterator < Entry < K , V > > spliterator ( K key , NavigableMap < K , V > map ) { return Spliterators . spliterator ( new RingIterator ( key , map ) , map . size ( ) , 0 ) ; } | Returns a spliterator that iterates all NavigableMap entries ascending starting from key and ending entry before key . |
14,880 | public static int compare ( CharSequence s1 , CharSequence s2 ) { return compare ( s1 , s2 , Funcs :: same ) ; } | Compares two CharSequences |
14,881 | public static int compare ( CharSequence s1 , CharSequence s2 , IntUnaryOperator op ) { return Streams . compare ( s1 . codePoints ( ) . map ( op ) , s2 . codePoints ( ) . map ( op ) ) ; } | Compares two CharSequences with codepoint mapping |
14,882 | public static boolean startsWith ( CharSequence seq , CharSequence pattern ) { return startsWith ( seq , pattern , Funcs :: same ) ; } | Return true if seq start match pattern exactly . |
14,883 | public static boolean startsWith ( CharSequence seq , CharSequence pattern , IntUnaryOperator op ) { if ( pattern . length ( ) > seq . length ( ) ) { return false ; } int length = pattern . length ( ) ; for ( int ii = 0 ; ii < length ; ii ++ ) { if ( op . applyAsInt ( seq . charAt ( ii ) ) != op . applyAsInt ( pattern ... | Return true if seq start match pattern after both characters have been converted with op . |
14,884 | public static boolean endsWith ( CharSequence seq , CharSequence pattern ) { return endsWith ( seq , pattern , Funcs :: same ) ; } | Return true if seq end match pattern exactly . |
14,885 | public static boolean endsWith ( CharSequence seq , CharSequence pattern , IntUnaryOperator op ) { if ( pattern . length ( ) > seq . length ( ) ) { return false ; } int ls = seq . length ( ) ; int lp = pattern . length ( ) ; for ( int ii = 1 ; ii <= lp ; ii ++ ) { if ( op . applyAsInt ( seq . charAt ( ls - ii ) ) != op... | Return true if seq end match pattern after both characters have been converted |
14,886 | public static int indexOf ( CharSequence seq , CharSequence pattern , int fromIndex ) { return indexOf ( seq , pattern , ( int a , int b ) -> { return a == b ; } , fromIndex ) ; } | Returns index of pattern starting at fromIndex or - 1 if pattern not found |
14,887 | public String asString ( Object object ) { Calendar calendar = Calendar . getInstance ( TimeZone . getTimeZone ( "GMT" ) ) ; calendar . setTime ( ( Date ) object ) ; StringBuilder builder = new StringBuilder ( ) ; int year = calendar . get ( Calendar . YEAR ) ; if ( calendar . get ( Calendar . ERA ) == 0 ) { if ( year ... | Return ISO8601 string representation for given date instance . |
14,888 | public static Object convertPrimitive ( Object object ) { if ( object == null ) { return object ; } Class < ? > clazz = object . getClass ( ) ; if ( clazz . isPrimitive ( ) ) { if ( boolean . class . equals ( clazz ) ) { Boolean b = ( Boolean ) object ; return b ; } if ( byte . class . equals ( clazz ) ) { Byte b = ( B... | Convert a primitive object to its Class object |
14,889 | public void flushPTable ( PTable pTable ) { if ( pTable . getLookupKey ( ) instanceof String ) { try { String strFilePath = ( String ) pTable . getLookupKey ( ) ; String strFilename = this . getFilename ( strFilePath , true ) ; FileOutputStream ostream = new FileOutputStream ( strFilename ) ; ObjectOutputStream p = new... | Write the serial table to the file . |
14,890 | public void addPropertyListeners ( ) { BaseField fldProperties = this . getField ( PropertiesRecord . PROPERTIES ) ; if ( fldProperties . getListener ( CopyConvertersHandler . class ) != null ) return ; this . addPropertiesFieldBehavior ( this . getField ( UserInfo . FRAMES ) , DBParams . FRAMES ) ; this . addPropertie... | Add The listeners to sync the property field with the virtual fields . |
14,891 | public boolean getUserInfo ( String strUser , boolean bForceRead ) { boolean bFound = false ; if ( ( strUser == null ) || ( strUser . length ( ) == 0 ) ) return false ; int iUserID = - 1 ; try { if ( Utility . isNumeric ( strUser ) ) if ( ( strUser != null ) && ( strUser . length ( ) > 0 ) ) iUserID = Integer . parseIn... | GetUserInfo Method . |
14,892 | public boolean validUserProperty ( String strProperty ) { if ( DBParams . FRAMES . equalsIgnoreCase ( strProperty ) ) return true ; if ( DBParams . MENUBARS . equalsIgnoreCase ( strProperty ) ) return true ; if ( DBParams . NAVMENUS . equalsIgnoreCase ( strProperty ) ) return true ; if ( DBParams . JAVA . equalsIgnoreC... | Is this a valid user property? . |
14,893 | public void commitStacktraceMD5 ( ) throws IOException , ServiceException { listEntry . getCustomElements ( ) . setValueLocal ( AcraReportHeader . STACK_TRACE_MD5 . tagName ( ) , getStacktraceMD5 ( ) ) ; listEntry . update ( ) ; } | Updates the stacktrace MD5 hash on the remote Google spreadsheet . |
14,894 | public static ArrayList < File > getFilesInDirectoryTree ( File file , String includeMask ) { return getContentsInDirectoryTree ( file , includeMask , true , false ) ; } | Retrieves all files from a directory and its subdirectories matching the given mask . |
14,895 | private static ArrayList < File > getContentsInDirectoryTree ( File directory , String includeMask , boolean returnFiles , boolean returnDirs ) { return getContentsInDirectoryTree ( directory , new FileFilterRuleSet ( directory . getPath ( ) ) . setIncludeFilesWithNameMask ( includeMask ) , returnFiles , returnDirs ) ;... | Retrieves contents from a directory and its subdirectories matching a given mask . |
14,896 | private static ArrayList < File > getContentsInDirectoryTree ( File directory , FileFilterRuleSet ruleSet , boolean returnFiles , boolean returnDirs ) { ArrayList < File > result = new ArrayList < File > ( ) ; if ( directory != null && directory . exists ( ) && directory . isDirectory ( ) ) { File [ ] files = directory... | Retrieves contents from a directory and its subdirectories matching a given rule set . |
14,897 | public static ArrayList < File > getDirectoriesInDirectoryTree ( String path ) { File file = new File ( path ) ; return getContentsInDirectoryTree ( file , "*" , false , true ) ; } | Retrieves all directories from a directory and its subdirectories . |
14,898 | public static File getClassFileFromDirectoryInClassPath ( String className ) { String fileName = StringSupport . replaceAll ( className , "." , "/" ) ; fileName += ".class" ; return getFileFromDirectoryInClassPath ( fileName , System . getProperty ( "java.class.path" ) ) ; } | Tries to retrieve a class as File from all directories mentioned in system property java . class . path |
14,899 | public static File getFileFromDirectoryInClassPath ( String fileName , String classPath ) { Collection < String > paths = StringSupport . split ( classPath , ";:" , false ) ; for ( String singlePath : paths ) { File dir = new File ( singlePath ) ; if ( dir . isDirectory ( ) ) { File file = new File ( singlePath + '/' +... | Locates a file in the classpath . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.