signature:
public class SetMessageStatusBehavior { /** * Render to the web response whatever the component wants to contribute to
 * the head section .
 * @ param _ component Component this behavior belongs to
 * @ param _ response Response object */
@ Override public void renderHead ( final Component _component , final IHeaderResponse _response ) { } }

implementation:
try { _response . render ( JavaScriptHeaderItem . forScript ( SetMessageStatusBehavior . getScript ( ) , SetMessageStatusBehavior . class . getName ( ) ) ) ; } catch ( final EFapsException e ) { // TODO Auto - generated catch block
e . printStackTrace ( ) ; }


signature:
public class GetContentServiceImpl { /** * Create a new GetContentServiceImpl of type { @ link QueryResults }
 * @ param hodServiceConfig The configuration to use
 * @ return A new { @ literal GetContentService < Document > } */
public static GetContentServiceImpl < Document > documentsService ( final HodServiceConfig < ? , TokenType . Simple > hodServiceConfig ) { } }

implementation: return new GetContentServiceImpl < > ( hodServiceConfig , Document . class ) ;


signature:
public class ModalWindowAjaxPageCreator { /** * Method that creates the page .
 * @ return new Page */
@ Override public Page createPage ( ) { } }

implementation: Page ret = null ; try { final String instKey = this . uiObject . getInstance ( ) == null ? null : this . uiObject . getInstance ( ) . getKey ( ) ; if ( this . uiObject . getCommand ( ) . getTargetTable ( ) == null ) { final UIForm uiform = new UIForm ( this . uiObject . getCommand ( ) . getUUID ( ) , instKey ) . setPagePosition ( this . pagePosition ) ; uiform . setPicker ( this . uiObject ) ; if ( ! uiform . isInitialized ( ) ) { uiform . execute ( ) ; } if ( uiform . getElements ( ) . isEmpty ( ) ) { ret = new DialogPage ( this . modalWindow . getPage ( ) . getPageReference ( ) , uiform . getCommand ( ) . getName ( ) + ".InvalidInstance" , false , false ) ; } else { if ( this . uiObject . getCommand ( ) . isSubmit ( ) ) { final IRequestParameters parameters = RequestCycle . get ( ) . getRequest ( ) . getRequestParameters ( ) ; uiform . setSelected ( parameters . getParameterValues ( "selectedRow" ) ) ; } ret = new FormPage ( Model . of ( uiform ) , this . modalWindow , this . modalWindow . getPage ( ) . getPageReference ( ) ) ; } } else { if ( this . uiObject . getCommand ( ) . getTargetStructurBrowserField ( ) == null ) { final UITable uitable = new UITable ( this . uiObject . getCommand ( ) . getUUID ( ) , instKey ) . setPagePosition ( this . pagePosition ) ; uitable . setPicker ( this . uiObject ) ; ret = new TablePage ( Model . of ( uitable ) , this . modalWindow , this . modalWindow . getPage ( ) . getPageReference ( ) ) ; } else { final UIStructurBrowser uiPageObject = new UIStructurBrowser ( this . uiObject . getCommand ( ) . getUUID ( ) , instKey ) ; uiPageObject . setPicker ( this . uiObject ) ; ret = new StructurBrowserPage ( Model . of ( uiPageObject ) , this . modalWindow , this . modalWindow . getPage ( ) . getPageReference ( ) ) ; } } } catch ( final EFapsException e ) { ret = new ErrorPage ( e ) ; } return ret ;


signature:
public class OpenModalBehavior { /** * Show the modal window .
 * @ param _ target AjaxRequestTarget */
@ Override protected void onEvent ( final AjaxRequestTarget _target ) { } }

implementation: final ModalWindowContainer modal = getComponent ( ) . getPage ( ) . visitChildren ( ModalWindowContainer . class , new ModalVisitor ( ) ) ; modal . show ( _target ) ;


signature:
public class UIFieldSet { /** * Adds the value .
 * @ param _ rowInstance instance for the row to be added
 * @ param _ uiFieldSetValue the _ ui field set value */
public void addValue ( final Instance _rowInstance , final UIFieldSetValue _uiFieldSetValue ) { } }

implementation: this . instKey2row . get ( _rowInstance . getKey ( ) ) . add ( _uiFieldSetValue ) ;


signature:
public class UIFieldSet { /** * Gets the index .
 * @ param _ inputName the _ input name
 * @ return the index */
public int getIndex ( final String _inputName ) { } }

implementation: Integer ret = 0 ; if ( this . indexes . containsKey ( _inputName ) ) { ret = this . indexes . get ( _inputName ) + 1 ; } this . indexes . put ( _inputName , ret ) ; return ret ;


signature:
public class UIFieldSet { /** * Add a new Row .
 * @ throws EFapsException on error */
public void addNewRow ( ) throws EFapsException { } }

implementation: final UIFieldSetRow row = new UIFieldSetRow ( this ) ; this . rows . add ( row ) ; for ( final UIFieldSetColHeader header : getHeaders ( ) ) { final UIValue uiValue = UIValue . get ( Field . get ( header . getFieldId ( ) ) , Attribute . get ( header . getAttrId ( ) ) , null ) ; final UIFieldSetValue cellSetValue = new UIFieldSetValue ( getParent ( ) , null , this , uiValue ) ; row . add ( cellSetValue ) ; }


signature:
public class RequireBehavior { /** * Render the links for the head .
 * @ param _ component component the header will be rendered for
 * @ param _ response resonse to add */
@ Override public void renderHead ( final Component _component , final IHeaderResponse _response ) { } }

implementation: super . renderHead ( _component , _response ) ; final StringBuilder js = new StringBuilder ( ) . append ( "require([" ) ; for ( int i = 0 ; i < this . packages . length ; i ++ ) { if ( i > 0 ) { js . append ( "," ) ; } js . append ( "\"" ) . append ( this . packages [ i ] ) . append ( "\"" ) ; } js . append ( "]);" ) ; _response . render ( JavaScriptHeaderItem . forScript ( js , _component . getId ( ) ) ) ;


signature:
public class ClassificationTree { /** * Recursive method to add child classifications .
 * @ param _ uiClass classification to add
 * @ param _ force force expanded */
private void addChildren ( final UIClassification _uiClass , final boolean _force ) { } }

implementation: if ( _force || _uiClass . isExpanded ( ) ) { getModelObject ( ) . add ( _uiClass ) ; for ( final UIClassification child : _uiClass . getChildren ( ) ) { addChildren ( child , _force ) ; } }


signature:
public class ClassificationTree { /** * ( non - Javadoc )
 * @ see org . apache . wicket . extensions . markup . html . repeater . tree . AbstractTree #
 * newContentComponent ( java . lang . String , org . apache . wicket . model . IModel ) */
@ Override protected Component newContentComponent ( final String _id , final IModel < UIClassification > _model ) { } }

implementation:
return new CheckedFolder < UIClassification > ( _id , this , _model ) { private static final long serialVersionUID = 1L ; @ Override protected void onUpdate ( final AjaxRequestTarget _target ) { final boolean selected = getModelObject ( ) . isSelected ( ) ; final ClassificationTreePanel parent = findParent ( ClassificationTreePanel . class ) ; // Don ' t do that if it is a filter
if ( parent != null && ! getModelObject ( ) . isMultipleSelect ( ) && ! selected ) { // select event ensure that there are no other objects selected by cleaning it totally
UIClassification uiClass = getModelObject ( ) ; while ( ! uiClass . isBase ( ) ) { uiClass = uiClass . getParent ( ) ; } toggleDown ( uiClass , false ) ; } // unselect event ensure that no children are selected
if ( selected ) { toggleDown ( getModelObject ( ) , false ) ; } else { toggleUp ( getModelObject ( ) , true ) ; } _target . add ( ClassificationTree . this ) ; if ( parent != null ) { parent . modelChanged ( ) ; } } private void toggleUp ( final UIClassification _uiClass , final boolean _selected ) { UIClassification uiClass = _uiClass ; uiClass . setSelected ( _selected ) ; while ( ! uiClass . isBase ( ) ) { uiClass = uiClass . getParent ( ) ; uiClass . setSelected ( _selected ) ; } } private void toggleDown ( final UIClassification _uiClass , final boolean _selected ) { _uiClass . setSelected ( _selected ) ; for ( final UIClassification child : _uiClass . getChildren ( ) ) { toggleDown ( child , _selected ) ; } } @ Override protected IModel < Boolean > newCheckBoxModel ( final IModel < UIClassification > _model ) { return Model . of ( _model . getObject ( ) . isSelected ( ) ) ; } } ;


signature:
public class HelpUtil { /** * Gets the help .
 * @ param _ cmdId the cmd id
 * @ return the help */
public static CharSequence getHelp ( final long _cmdId ) { } }

implementation: CharSequence ret ; try { final Class < ? > clazz = Class . forName ( Configuration . getAttribute ( Configuration . ConfigAttribute . HELPSNIPPROV ) , false , EFapsClassLoader . getInstance ( ) ) ; final IHelpProvider provider = ( IHelpProvider ) clazz . newInstance ( ) ; ret = provider . getHelp ( _cmdId ) ; } catch ( final ClassNotFoundException | InstantiationException | IllegalAccessException | EFapsBaseException e ) { HelpUtil . LOG . error ( "ClassNotFoundException" , e ) ; ret = "" ; } return ret ;


signature:
public class HelpUtil { /** * Gets the menu item .
 * @ return the menu item
 * @ throws CacheReloadException the cache reload exception */
public static UIMenuItem getHelpMenuItem ( ) { } }

implementation: UIMenuItem ret = null ; try { final String cmdStr = Configuration . getAttribute ( ConfigAttribute . HELPEDITCMD ) ; final Command cmd = UUIDUtil . isUUID ( cmdStr ) ? Command . get ( UUID . fromString ( cmdStr ) ) : Command . get ( cmdStr ) ; ret = new UIMenuItem ( cmd . getUUID ( ) ) ; } catch ( final EFapsBaseException e ) { HelpUtil . LOG . error ( "ClassNotFoundException" , e ) ; } return ret ;


signature:
public class UIStructurBrowser { /** * Internal method to call a constructor , it is used to set that this
 * StructurBrowserModel is not a root .
 * @ param _ instance Instance
 * @ param _ strucBrwsr StructurBrowser the values will be copied from
 * @ return UIStructurBrowser
 * @ throws EFapsException on error */
protected UIStructurBrowser getNewStructurBrowser ( final Instance _instance , final UIStructurBrowser _strucBrwsr ) throws EFapsException { } }

implementation: final UUID uuid ; if ( _strucBrwsr . getTable ( ) == null ) { uuid = Menu . getTypeTreeMenu ( _instance . getType ( ) ) . getUUID ( ) ; } else { uuid = _strucBrwsr . getCommandUUID ( ) ; } final UIStructurBrowser ret = new UIStructurBrowser ( uuid , _instance == null ? null : _instance . getKey ( ) , false , _strucBrwsr . getSortDirection ( ) ) ; ret . setParentBrws ( this ) ; ret . setLevel ( getLevel ( ) + 1 ) ; return ret ;


signature:
public class UIStructurBrowser { /** * Method used to initialize this StructurBrowserModel .
 * @ throws EFapsException on error */
protected void initialise ( ) throws EFapsException { } }

implementation:
final AbstractCommand command = getCommand ( ) ; if ( command != null && command . getTargetTable ( ) != null ) { setTableUUID ( command . getTargetTable ( ) . getUUID ( ) ) ; this . browserFieldName = command . getTargetStructurBrowserField ( ) ; setShowCheckBoxes ( command . isTargetShowCheckBoxes ( ) ) ; } else if ( getInstance ( ) != null ) { final String tmplabel = Menu . getTypeTreeMenu ( getInstance ( ) . getType ( ) ) . getLabel ( ) ; this . valueLabel = DBProperties . getProperty ( tmplabel ) ; } // set default sort
if ( command . getTargetTableSortKey ( ) != null ) { setSortKeyInternal ( command . getTargetTableSortKey ( ) ) ; setSortDirection ( command . getTargetTableSortDirection ( ) ) ; } // get the User specific Attributes if exist overwrite the defaults
try { if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTKEY ) ) ) { setSortKeyInternal ( Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTKEY ) ) ) ; } if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTDIRECTION ) ) ) { setSortDirection ( SortDirection . getEnum ( Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTDIRECTION ) ) ) ) ; } } catch ( final EFapsException e ) { // we don ' t throw an error because this are only Usersettings
UIStructurBrowser . LOG . error ( "error during the retrieve of UserAttributes" , e ) ; }


signature:
public class UIStructurBrowser { /** * This method should be called to actually execute this
 * StructurBrowserModel , that means to retrieve the values from the
 * eFaps - DataBase , create the TreeModel etc . This method actually calls
 * depending if we have a Tree or a TreeTabel the Methodes
 * { @ link # executeTree ( List ) } or { @ link # executeTreeTable ( List ) }
 * @ see # executeTree ( List )
 * @ see # executeTreeTable ( List ) */
@ Override @ SuppressWarnings ( "unchecked" ) public void execute ( ) { } }

implementation: setExecutionStatus ( UIStructurBrowser . ExecutionStatus . EXECUTE ) ; final List < Return > ret ; try { if ( getTableUUID ( ) == null ) { final Map < Instance , Boolean > map = new LinkedHashMap < > ( ) ; map . put ( getInstance ( ) , null ) ; executeTree ( map , false ) ; } else { final Map < Instance , Boolean > map = new LinkedHashMap < > ( ) ; if ( ! isCreateMode ( ) ) { ret = getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . CLASS , this , ParameterValues . INSTANCE , getInstance ( ) ) ; map . putAll ( ( Map < Instance , Boolean > ) ret . get ( 0 ) . get ( ReturnValues . VALUES ) ) ; } executeTreeTable ( map , false ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * This method is called in case of a Tree from the { @ link # execute ( ) } method
 * to fill this StructurBrowserModel with live .
 * @ param _ map List of Object
 * @ param _ expand inside an expand */
protected void executeTree ( final Map < Instance , Boolean > _map , final boolean _expand ) { } }

implementation: try { final List < Instance > instances = new ArrayList < > ( ) ; for ( final Instance inst : _map . keySet ( ) ) { instances . add ( inst ) ; } final ValueParser parser = new ValueParser ( new StringReader ( this . valueLabel ) ) ; final ValueList valuelist = parser . ExpressionString ( ) ; final MultiPrintQuery print = new MultiPrintQuery ( instances ) ; valuelist . makeSelect ( print ) ; print . execute ( ) ; while ( print . next ( ) ) { Object value = null ; final Instance instance = print . getCurrentInstance ( ) ; value = valuelist . makeString ( getInstance ( ) , print , getMode ( ) ) ; final UIStructurBrowser child = getNewStructurBrowser ( instance , this ) ; this . children . add ( child ) ; child . setDirection ( _map . get ( instance ) ) ; child . setLabel ( value . toString ( ) ) ; child . setAllowChildren ( checkForAllowChildren ( instance ) ) ; if ( isAllowChildren ( ) ) { child . setParent ( checkForChildren ( instance ) ) ; } child . setImage ( Image . getTypeIcon ( instance . getType ( ) ) != null ? Image . getTypeIcon ( instance . getType ( ) ) . getName ( ) : null ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final ParseException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } sortModel ( ) ; expand ( _expand ) ; super . setInitialized ( true ) ;


signature:
public class UIStructurBrowser { /** * This method is called in case of a TreeTable from the { @ link # execute ( ) }
 * method to fill this StructurBrowserModel with live .
 * @ param _ map List of Objects
 * @ param _ expand inside an expand */
protected void executeTreeTable ( final Map < Instance , Boolean > _map , final boolean _expand ) { } }

implementation:
try { final List < Instance > instances = new ArrayList < > ( ) ; for ( final Instance inst : _map . keySet ( ) ) { instances . add ( inst ) ; } final List < Integer > userWidthList = getUserWidths ( ) ; // evaluate for all expressions in the table
final MultiPrintQuery multi = new MultiPrintQuery ( instances ) ; Type type = instances . isEmpty ( ) ? null : instances . get ( 0 ) . getType ( ) ; int i = 0 ; for ( final Field field : getUserSortedColumns ( ) ) { Attribute attr = null ; if ( field . hasAccess ( getMode ( ) , getInstance ( ) ) && ! field . isNoneDisplay ( getMode ( ) ) ) { if ( _map . size ( ) > 0 ) { if ( field . getSelect ( ) != null ) { multi . addSelect ( field . getSelect ( ) ) ; } else if ( field . getAttribute ( ) != null ) { multi . addAttribute ( field . getAttribute ( ) ) ; } else if ( field . getPhrase ( ) != null ) { multi . addPhrase ( field . getName ( ) , field . getPhrase ( ) ) ; } else if ( field . getMsgPhrase ( ) != null ) { multi . addMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( field ) ) , field . getMsgPhrase ( ) ) ; } if ( field . getSelectAlternateOID ( ) != null ) { multi . addSelect ( field . getSelectAlternateOID ( ) ) ; } if ( field . containsProperty ( UITableFieldProperty . SORT_SELECT ) ) { multi . addSelect ( field . getProperty ( UITableFieldProperty . SORT_SELECT ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_PHRASE ) ) { multi . addPhrase ( field . getProperty ( UITableFieldProperty . SORT_PHRASE ) , field . getProperty ( UITableFieldProperty . SORT_PHRASE ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) { multi . addMsgPhrase ( field . getProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) ; } } if ( field . getAttribute ( ) != null && type != null ) { attr = type . getAttribute ( field . getAttribute ( ) ) ; } if ( isRoot ( ) ) { SortDirection sortdirection = SortDirection . NONE ; if ( field . getName ( ) . equals ( getSortKey ( ) ) ) { sortdirection = getSortDirection ( ) ; } if ( ! field . isHiddenDisplay ( getMode ( ) ) ) { final FieldConfiguration fieldConfig = new FieldConfiguration ( field . getId ( ) ) ; final UITableHeader uiTableHeader = new UITableHeader ( this , fieldConfig , sortdirection , attr ) ; getHeaders ( ) . add ( uiTableHeader ) ; if ( ! fieldConfig . isFixedWidth ( ) ) { if ( userWidthList != null && userWidthList . size ( ) > i ) { if ( isShowCheckBoxes ( ) && userWidthList . size ( ) > i + 1 ) { uiTableHeader . setWidth ( userWidthList . get ( i + 1 ) ) ; } else { uiTableHeader . setWidth ( userWidthList . get ( i ) ) ; } } setWidthWeight ( getWidthWeight ( ) + fieldConfig . getWidthWeight ( ) ) ; } } } i ++ ; } } if ( ! multi . execute ( ) ) { type = getTypeFromEvent ( ) ; } Attribute attr = null ; while ( multi . next ( ) ) { Instance instance = multi . getCurrentInstance ( ) ; final UIStructurBrowser child = getNewStructurBrowser ( instance , this ) ; child . setDirection ( _map . get ( instance ) ) ; for ( final Field field : getUserSortedColumns ( ) ) { instance = evaluateFieldInstance ( multi , field ) ; if ( field . hasAccess ( getMode ( ) , getInstance ( ) ) && ! field . isNoneDisplay ( getMode ( ) ) ) { Object value = null ; Object sortValue = null ; attr = null ; if ( field . getSelect ( ) != null ) { value = multi . getSelect ( field . getSelect ( ) ) ; attr = multi . getAttribute4Select ( field . getSelect ( ) ) ; } else if ( field . getAttribute ( ) != null ) { value = multi . getAttribute ( field . getAttribute ( ) ) ; attr = multi . getAttribute4Attribute ( field . getAttribute ( ) ) ; } else if ( field . getPhrase ( ) != null ) { value = multi . getPhrase ( field . getName ( ) ) ; } else if ( field . getMsgPhrase ( ) != null ) { value = multi . getMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( field ) ) , field . getMsgPhrase ( ) ) ; } if ( field . containsProperty ( UITableFieldProperty . SORT_SELECT ) ) { sortValue = multi . getSelect ( field . getProperty ( UITableFieldProperty . SORT_SELECT ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_PHRASE ) ) { sortValue = multi . getPhrase ( field . getProperty ( UITableFieldProperty . SORT_PHRASE ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) { sortValue = multi . getMsgPhrase ( field . getProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) ; } final UIField uiField = new UIField ( this , instance . getKey ( ) , UIValue . get ( field , attr , value ) . setInstance ( instance ) . setClassObject ( this ) . setCallInstance ( getInstance ( ) ) . setRequestInstances ( multi . getInstanceList ( ) ) ) ; uiField . setCompareValue ( sortValue ) ; if ( field . getName ( ) . equals ( getBrowserFieldName ( ) ) ) { child . setLabel ( uiField . getValue ( ) . getReadOnlyValue ( uiField . getParent ( ) . getMode ( ) ) ) ; child . setAllowChildren ( checkForAllowChildren ( instance ) ) ; if ( child . isAllowChildren ( ) ) { child . setAllowItems ( checkForAllowItems ( instance ) ) ; child . setParent ( checkForChildren ( instance ) ) ; } child . setImage ( Image . getTypeIcon ( instance . getType ( ) ) != null ? Image . getTypeIcon ( instance . getType ( ) ) . getName ( ) : null ) ; child . setBrowserFieldIndex ( child . getColumns ( ) . size ( ) ) ; } if ( field . isHiddenDisplay ( getMode ( ) ) ) { child . getHidden ( ) . add ( uiField ) ; } else { child . getColumns ( ) . add ( uiField ) ; } } } this . children . add ( child ) ; child . checkHideColumn4Row ( ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } sortModel ( ) ; expand ( _expand ) ; super . setInitialized ( true ) ;


signature:
public class UIStructurBrowser { /** * Expand the tree with the information from the Session .
 * @ param _ expand is this inside an expand */
@ SuppressWarnings ( "unchecked" ) protected void expand ( final boolean _expand ) { } }

implementation:
try { // only if the element was opened the first time e . g . reload etc .
if ( ( isRoot ( ) || _expand ) && ( Context . getThreadContext ( ) . containsSessionAttribute ( getCacheKey ( ) ) || this . forceExpanded ) ) { final Map < String , Boolean > sessMap = ( Map < String , Boolean > ) Context . getThreadContext ( ) . getSessionAttribute ( getCacheKey ( ) ) ; for ( final UIStructurBrowser uiChild : this . children ) { if ( isForceExpanded ( ) || sessMap == null || sessMap . containsKey ( uiChild . getInstanceKey ( ) ) ) { final Boolean expandedTmp = sessMap == null || isForceExpanded ( ) ? true : sessMap . get ( uiChild . getInstanceKey ( ) ) ; if ( expandedTmp != null && expandedTmp && uiChild . isParent ( ) ) { uiChild . setExecutionStatus ( UIStructurBrowser . ExecutionStatus . ADDCHILDREN ) ; final List < Return > ret = getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , uiChild . getInstance ( ) , ParameterValues . CLASS , uiChild ) ; final Map < Instance , Boolean > map = ( Map < Instance , Boolean > ) ret . get ( 0 ) . get ( ReturnValues . VALUES ) ; uiChild . setExpanded ( true ) ; uiChild . add2ExpandedBrowsers ( uiChild ) ; if ( uiChild . getTableUUID ( ) == null ) { uiChild . executeTree ( map , true ) ; } else { uiChild . executeTreeTable ( map , true ) ; } } } } } } catch ( final EFapsException e ) { UIStructurBrowser . LOG . error ( "Error retreiving Session info for StruturBrowser from Command with UUID: {}" , getCommandUUID ( ) , e ) ; }


signature:
public class UIStructurBrowser { /** * Method to sort the data of this model . It calls an esjp for sorting . */
protected void sortModel ( ) { } }

implementation: setExecutionStatus ( UIStructurBrowser . ExecutionStatus . SORT ) ; try { getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . CLASS , this ) ; if ( getSortDirection ( ) == SortDirection . DESCENDING ) { Collections . reverse ( this . children ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * Method is called from the StructurBrowser in edit mode before rendering
 * the columns for row to be able to hide the columns for different rows by
 * setting the cell model to hide . */
public void checkHideColumn4Row ( ) { } }

implementation: setExecutionStatus ( UIStructurBrowser . ExecutionStatus . CHECKHIDECOLUMN4ROW ) ; try { getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , getInstance ( ) , ParameterValues . CLASS , this ) ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * This method should be called to add children to a Node in the Tree . < br >
 * e . g . in a standard implementation the children would be added to the Tree
 * on the expand - Event of the tree . The children a retrieved from an esjp
 * with the EventType UI _ TABLE _ EVALUATE . */
@ SuppressWarnings ( "unchecked" ) public void addChildren ( ) { } }

implementation: setExecutionStatus ( UIStructurBrowser . ExecutionStatus . ADDCHILDREN ) ; final List < Return > ret ; try { ret = getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , getInstance ( ) , ParameterValues . CLASS , this ) ; final Map < Instance , Boolean > map = ( Map < Instance , Boolean > ) ret . get ( 0 ) . get ( ReturnValues . VALUES ) ; if ( getTableUUID ( ) == null ) { executeTree ( map , false ) ; } else { executeTreeTable ( map , false ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * This method is used to check if a node has potential children .
 * @ param _ instance Instance of a Node to be checked
 * @ return true if this Node has children , else false */
protected boolean checkForAllowChildren ( final Instance _instance ) { } }

implementation: setExecutionStatus ( UIStructurBrowser . ExecutionStatus . ALLOWSCHILDREN ) ; try { final List < Return > ret = getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , _instance , ParameterValues . CLASS , this ) ; return ret . isEmpty ( ) ? false : ret . get ( 0 ) . get ( ReturnValues . TRUE ) != null ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * This method is used to execute a listener with a specific event .
 * @ param _ status status to be executed
 * @ param _ uiID2Oid UI Id 2 Oid mapping */
public void executeListener ( final ExecutionStatus _status , final Map < String , String > _uiID2Oid ) { } }

implementation: setExecutionStatus ( _status ) ; try { getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , getInstance ( ) , ParameterValues . CLASS , this , ParameterValues . OIDMAP4UI , _uiID2Oid ) ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * Method is called from the StructurBrowser in edit mode from
 * { @ link # setValuesFromUI ( Map , DefaultMutableTreeNode ) } to get
 * additional JavaScript to be appended to the AjaxTarget .
 * @ param _ parameters Parameter as send from the UserInterface
 * @ return JavaScript for the UserInterface */
protected String getJavaScript4Target ( final Map < String , String [ ] > _parameters ) { } }

implementation: final String ret ; setExecutionStatus ( UIStructurBrowser . ExecutionStatus . GETJAVASCRIPT4TARGET ) ; try { final List < Return > retList = getObject4Event ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , getInstance ( ) , ParameterValues . CLASS , this , ParameterValues . PARAMETERS , _parameters ) ; ret = ( String ) retList . get ( 0 ) . get ( ReturnValues . SNIPLETT ) ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } return ret ;


signature:
public class UIStructurBrowser { /** * This method is updating the Label , by querying the eFaps - DataBase . */
public void requeryLabel ( ) { } }

implementation: try { final ValueParser parser = new ValueParser ( new StringReader ( this . valueLabel ) ) ; final ValueList valList = parser . ExpressionString ( ) ; final PrintQuery print = new PrintQuery ( getInstance ( ) ) ; valList . makeSelect ( print ) ; if ( print . execute ( ) ) { setLabel ( valList . makeString ( getInstance ( ) , print , getMode ( ) ) . toString ( ) ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final ParseException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIStructurBrowser { /** * Setter method for instance variable { @ link # sortDirection } and for all
 * children also .
 * @ param _ sortDirection value for instance variable { @ link # sortDirection } */
@ Override public void setSortDirection ( final SortDirection _sortDirection ) { } }

implementation: super . setSortDirection ( _sortDirection ) ; for ( final UIStructurBrowser child : this . children ) { child . setSortDirectionInternal ( _sortDirection ) ; }


signature:
public class UIStructurBrowser { /** * Store the Information in the Session . */
@ SuppressWarnings ( "unchecked" ) private void storeInSession ( ) { } }

implementation: try { if ( ! getMode ( ) . equals ( TargetMode . CREATE ) ) { final Map < String , Boolean > sessMap ; if ( Context . getThreadContext ( ) . containsSessionAttribute ( getCacheKey ( ) ) ) { sessMap = ( Map < String , Boolean > ) Context . getThreadContext ( ) . getSessionAttribute ( getCacheKey ( ) ) ; } else { sessMap = new HashMap < > ( ) ; } sessMap . put ( getInstanceKey ( ) , isExpanded ( ) ) ; Context . getThreadContext ( ) . setSessionAttribute ( getCacheKey ( ) , sessMap ) ; } } catch ( final EFapsException e ) { UIStructurBrowser . LOG . error ( "Error storing Session info for StruturBrowser called by Command with UUID: {}" , getCommandUUID ( ) , e ) ; }


signature:
public class AutoCompleteBehavior { /** * Bind this handler to the given component .
 * @ param _ hostComponent the component to bind to */
@ Override public final void bind ( final Component _hostComponent ) { } }

implementation: Args . notNull ( _hostComponent , "hostComponent" ) ; if ( this . component != null ) { throw new IllegalStateException ( "this kind of handler cannot be attached to " + "multiple components; it is already attached to component " + this . component + ", but component " + _hostComponent + " wants to be attached too" ) ; } this . component = _hostComponent ; this . component . setOutputMarkupId ( true ) ;


signature:
public class ResultPanel { /** * Gets the data table .
 * @ param _ indexSearch the index search
 * @ return the data table */
private DataTable < Element , Void > getDataTable ( final IndexSearch _indexSearch ) { } }

implementation: final List < IColumn < Element , Void > > columns = new ArrayList < > ( ) ; columns . add ( new AbstractColumn < Element , Void > ( new Model < > ( "" ) ) { private static final long serialVersionUID = 1L ; @ Override public void populateItem ( final Item < ICellPopulator < Element > > _cellItem , final String _componentId , final IModel < Element > _rowModel ) { _cellItem . add ( new Link ( _componentId , _rowModel ) ) ; } } ) ; if ( _indexSearch . getSearch ( ) == null || _indexSearch . getSearch ( ) . getResultFields ( ) . isEmpty ( ) ) { columns . add ( new PropertyColumn < Element , Void > ( new Model < > ( "" ) , "text" ) ) ; } else { for ( final Entry < String , Collection < String > > entry : _indexSearch . getSearch ( ) . getResultFields ( ) . entrySet ( ) ) { columns . add ( new ResultColumn ( _indexSearch . getSearch ( ) . getResultLabel ( ) . get ( entry . getKey ( ) ) , entry . getValue ( ) ) ) ; } } final DataTable < Element , Void > ret = new DataTable < > ( "table" , columns , _indexSearch . getDataProvider ( ) , _indexSearch . getSearch ( ) == null ? 100 : _indexSearch . getSearch ( ) . getNumHits ( ) ) ; ret . addTopToolbar ( new HeadersToolbar < > ( ret , null ) ) ; return ret ;


signature:
public class ResultPanel { /** * Update .
 * @ param _ target the target
 * @ param _ indexSearch the index search */
public void update ( final AjaxRequestTarget _target , final IndexSearch _indexSearch ) { } }

implementation: ResultPanel . this . visitChildren ( DimensionPanel . class , new IVisitor < Component , Void > ( ) { @ Override public void component ( final Component _component , final IVisit < Void > _visit ) { try { if ( _indexSearch . getSearch ( ) . getConfigs ( ) . contains ( SearchConfig . ACTIVATE_DIMENSION ) ) { _component . setVisible ( true ) ; } else { _component . setVisible ( false ) ; } } catch ( final EFapsException e ) { ResultPanel . LOG . error ( "Catched error" , e ) ; } _visit . dontGoDeeper ( ) ; } } ) ; ResultPanel . this . visitChildren ( DataTable . class , new IVisitor < Component , Void > ( ) { @ Override public void component ( final Component _component , final IVisit < Void > _visit ) { if ( _indexSearch . getResult ( ) . getElements ( ) . isEmpty ( ) ) { _component . setVisible ( false ) ; } else { _component . setVisible ( true ) ; } if ( _indexSearch . isUpdateTable ( ) ) { _component . replaceWith ( getDataTable ( _indexSearch ) ) ; } _visit . dontGoDeeper ( ) ; } } ) ; ResultPanel . this . visitChildren ( Label . class , new IVisitor < Component , Void > ( ) { @ Override public void component ( final Component _component , final IVisit < Void > _visit ) { final String compid = _component . getId ( ) ; switch ( compid ) { case "hits" : if ( _indexSearch . getResult ( ) . getElements ( ) . isEmpty ( ) ) { _component . setVisible ( false ) ; } else { _component . setVisible ( true ) ; ( ( Label ) _component ) . setDefaultModelObject ( DBProperties . getFormatedDBProperty ( ResultPanel . class . getName ( ) + ".Hits" , _indexSearch . getResult ( ) . getElements ( ) . size ( ) , _indexSearch . getResult ( ) . getHitCount ( ) ) ) ; } break ; case "noResult" : if ( _indexSearch . getResult ( ) . getElements ( ) . isEmpty ( ) ) { _component . setVisible ( true ) ; ( ( Label ) _component ) . setDefaultModelObject ( DBProperties . getProperty ( ResultPanel . class . getName ( ) + ".NoResult" ) ) ; } else { _component . setVisible ( false ) ; } break ; default : break ; } } } ) ;


signature:
public class LazyIframeBehavior { /** * Render the links for the head .
 * @ param _ component component the header will be rendered for
 * @ param _ response resonse to add */
@ Override public void renderHead ( final Component _component , final IHeaderResponse _response ) { } }

implementation: super . renderHead ( _component , _response ) ; final StringBuilder js = new StringBuilder ( ) . append ( "ready(function() {" ) . append ( "registry.byId(\"" ) . append ( _component . getMarkupId ( ) ) . append ( "\").set(\"content\", domConstruct.create(\"iframe\", {" ) ; if ( this . frameMarkupId != null ) { js . append ( "\"id\": \"" ) . append ( this . frameMarkupId ) . append ( "\"," ) ; } js . append ( "\"src\": \"" ) . append ( _component . urlForListener ( new PageParameters ( ) ) ) . append ( "\",\"style\": \"border: 0; width: 100%; height: 99%\", \"nodeId\": \"jan\"" ) . append ( "}));" ) . append ( "});" ) ; _response . render ( JavaScriptHeaderItem . forScript ( DojoWrapper . require ( js , DojoClasses . ready , DojoClasses . registry , DojoClasses . domConstruct ) , _component . getMarkupId ( ) + "-Script" ) ) ;


signature:
public class NumberUIFactory { /** * { @ inheritDoc } */
@ Override protected String getReadOnlyValue ( final AbstractUIField _abstractUIField ) throws EFapsException { } }

implementation: String strValue = "" ; final Object valueTmp = _abstractUIField . getValue ( ) . getReadOnlyValue ( _abstractUIField . getParent ( ) . getMode ( ) ) ; if ( valueTmp instanceof Number ) { strValue = String . valueOf ( valueTmp ) ; } else { strValue = valueTmp == null ? "" : String . valueOf ( valueTmp ) ; } return strValue ;


signature:
public class AbstractModalWindow { /** * Initialize . */
protected void initialize ( ) { } }

implementation: if ( "w_silver" . equals ( Configuration . getAttribute ( ConfigAttribute . DOJO_MODALCLASS ) ) ) { setCssClassName ( ModalWindow . CSS_CLASS_GRAY ) ; } else if ( "w_blue" . equals ( Configuration . getAttribute ( ConfigAttribute . DOJO_MODALCLASS ) ) ) { setCssClassName ( ModalWindow . CSS_CLASS_BLUE ) ; } showUnloadConfirmation ( false ) ; setTitle ( DBProperties . getProperty ( "Logo.Version.Label" ) ) ;


signature:
public class UICmdField { /** * Execute the underlying events .
 * @ param _ others others
 * @ param _ uiID2Oid the ui i d2 oid
 * @ return list of returns
 * @ throws EFapsException on error */
public List < Return > executeEvents ( final Object _others , final Map < String , String > _uiID2Oid ) throws EFapsException { } }

implementation: if ( this . executionStatus == null ) { this . executionStatus = ExecutionStatus . EXECUTE ; } final List < Return > ret = executeEvents ( EventType . UI_FIELD_CMD , _others , _uiID2Oid ) ; if ( this . executionStatus == ExecutionStatus . EXECUTE ) { this . executionStatus = null ; } return ret ;


signature:
public class UICmdField { /** * Get the script to render the content for the UserInterface in case that
 * not a standard button should be rendered .
 * @ param _ script additional script from the UserInterface
 * @ param _ uiID2Oid the ui i d2 oid
 * @ return html snipplet
 * @ throws EFapsException on error */
public String getRenderedContent ( final String _script , final Map < String , String > _uiID2Oid ) throws EFapsException { } }

implementation: this . executionStatus = UICmdField . ExecutionStatus . RENDER ; final StringBuilder snip = new StringBuilder ( ) ; final List < Return > returns = executeEvents ( _script , _uiID2Oid ) ; for ( final Return oneReturn : returns ) { if ( oneReturn . contains ( ReturnValues . SNIPLETT ) ) { snip . append ( oneReturn . get ( ReturnValues . SNIPLETT ) ) ; } } this . executionStatus = null ; return snip . toString ( ) ;


signature:
public class ContentContainerPage { /** * Method to initialize the Page .
 * @ param _ uuid uuid of the command
 * @ param _ instanceKey key to the instance
 * @ param _ selectCmdUUID uuid of the selected Command
 * @ throws EFapsException on error */
private void initialise ( final UUID _uuid , final String _instanceKey , final UUID _selectCmdUUID ) throws EFapsException { } }

implementation: final WebMarkupContainer borderPanel = new WebMarkupContainer ( "borderPanel" ) ; this . add ( borderPanel ) ; borderPanel . add ( new BorderContainerBehavior ( Design . SIDEBAR , true ) ) ; this . borderPanelId = borderPanel . getMarkupId ( true ) ; final AbstractCommand cmd = getCommand ( _uuid ) ; UUID tmpUUID = _uuid ; this . webForm = cmd . getTargetForm ( ) != null ; if ( cmd instanceof Menu ) { for ( final AbstractCommand childcmd : ( ( Menu ) cmd ) . getCommands ( ) ) { if ( _selectCmdUUID == null && childcmd . isDefaultSelected ( ) ) { tmpUUID = childcmd . getUUID ( ) ; this . webForm = childcmd . getTargetForm ( ) != null ; break ; } else if ( childcmd . getUUID ( ) . equals ( _selectCmdUUID ) ) { tmpUUID = childcmd . getUUID ( ) ; this . webForm = childcmd . getTargetForm ( ) != null ; break ; } } } final UUID uuid4NewPage = tmpUUID ; final LazyIframe centerPanel = new LazyIframe ( "centerPanel" , new IFrameProvider ( ) { private static final long serialVersionUID = 1L ; @ Override public Page getPage ( final Component _component ) { Page error = null ; WebPage page = null ; try { if ( ContentContainerPage . this . webForm ) { final UIForm uiForm = new UIForm ( uuid4NewPage , _instanceKey ) . setPagePosition ( PagePosition . TREE ) ; page = new FormPage ( Model . of ( uiForm ) , getPageReference ( ) ) ; } else { if ( getCommand ( uuid4NewPage ) . getTargetStructurBrowserField ( ) == null ) { if ( "GridX" . equals ( Configuration . getAttribute ( ConfigAttribute . TABLE_DEFAULTTYPETREE ) ) ) { page = new GridPage ( Model . of ( UIGrid . get ( uuid4NewPage , PagePosition . TREE ) . setCallInstance ( Instance . get ( _instanceKey ) ) ) ) ; } else { final UITable uiTable = new UITable ( uuid4NewPage , _instanceKey ) . setPagePosition ( PagePosition . TREE ) ; page = new TablePage ( Model . of ( uiTable ) ) ; } } else { if ( "GridX" . equals ( Configuration . getAttribute ( ConfigAttribute . STRUCBRWSR_DEFAULTTYPETREE ) ) ) { page = new GridPage ( Model . of ( UIGrid . get ( uuid4NewPage , PagePosition . TREE ) . setCallInstance ( Instance . get ( _instanceKey ) ) ) ) ; } else { page = new StructurBrowserPage ( uuid4NewPage , _instanceKey , getPageReference ( ) ) ; } } } } catch ( final EFapsException e ) { error = new ErrorPage ( e ) ; } return error == null ? page : error ; } } , null ) ; borderPanel . add ( centerPanel ) ; centerPanel . add ( new ContentPaneBehavior ( Region . CENTER , false ) ) ; this . centerPanelId = centerPanel . getMarkupId ( true ) ; borderPanel . add ( new SidePanel ( "leftPanel" , _uuid , _instanceKey , _selectCmdUUID , this . structurbrowser ) ) ;


signature:
public class ContentContainerPage { /** * Method to get a Command .
 * @ param _ uuid Uuid of the Command
 * @ return a AbstractCommand
 * @ throws CacheReloadException on error */
private AbstractCommand getCommand ( final UUID _uuid ) throws CacheReloadException { } }

implementation: AbstractCommand cmd = Command . get ( _uuid ) ; if ( cmd == null ) { cmd = Menu . get ( _uuid ) ; if ( cmd == null ) { cmd = Search . get ( _uuid ) ; } } return cmd ;


signature:
public class FooterPanel { /** * Method that searches a DBProperty for the Label .
 * @ param _ cmdObject the cmd object
 * @ param _ keytype what Label should be searched
 * @ return if found DBProperty of the CommandAbstract , else a Default
 * @ throws EFapsException on error */
private String getLabel ( final ICmdUIObject _cmdObject , final String _keytype ) throws EFapsException { } }

implementation: final String ret ; if ( DBProperties . hasProperty ( _cmdObject . getCommand ( ) . getName ( ) + ".Button." + _keytype ) ) { ret = DBProperties . getProperty ( _cmdObject . getCommand ( ) . getName ( ) + ".Button." + _keytype ) ; } else { ret = DBProperties . getProperty ( "default.Button." + _keytype ) ; } return ret ;


signature:
public class QueryTextIndexServiceImpl { /** * Creates a new QueryTextIndexServiceImpl of type { @ link Document }
 * @ param hodServiceConfig The configuration to use
 * @ return A new { @ literal QueryTextIndexServiceImpl < Document > } */
public static QueryTextIndexServiceImpl < Document > documentsService ( final HodServiceConfig < ? , TokenType . Simple > hodServiceConfig ) { } }

implementation: return new QueryTextIndexServiceImpl < > ( hodServiceConfig , Document . class ) ;


signature:
public class PreviousValueBehavior { /** * Gets the java script .
 * @ param _ markupId the markup id
 * @ return the java script */
protected CharSequence getJavaScript ( final String _markupId ) { } }

implementation: final StringBuilder ret = new StringBuilder ( ) . append ( "if (\"SELECT\" == dom.byId('" ) . append ( _markupId ) . append ( "').tagName) {" ) . append ( "on(dom.byId('" ) . append ( _markupId ) . append ( "'), \"focus\", function(){" ) . append ( "if (!dojo.byId('" ) . append ( _markupId ) . append ( "_previous')) {" ) . append ( "domConstruct.place(\"<input name='\" + domAttr.get('" ) . append ( _markupId ) . append ( "', 'name') + \"_eFapsPrevious' type='hidden' id='" ) . append ( _markupId ) . append ( "_previous'>\", '" ) . append ( _markupId ) . append ( "'); " ) . append ( "}" ) . append ( " dojo.byId('" ) . append ( _markupId ) . append ( "_previous').value = this.value;" ) . append ( "});" ) . append ( "}" ) . append ( "});" ) ; return DojoWrapper . require ( ret , DojoClasses . on , DojoClasses . dom , DojoClasses . domConstruct , DojoClasses . domAttr ) ;


signature:
public class EFapsSession { /** * Prune finished tasks . */
public synchronized void pruneFinishedTasks ( ) { } }

implementation: final ArrayList < IExecutionBridge > nonFinishedBridges = new ArrayList < > ( ) ; for ( final IExecutionBridge bridge : this . executionBridges ) { if ( ! bridge . isFinished ( ) ) { nonFinishedBridges . add ( bridge ) ; } } this . executionBridges = nonFinishedBridges ;


signature:
public class EFapsSession { /** * Gets the tasks page .
 * @ param _ start the _ start
 * @ param _ size the _ size
 * @ return the tasks page */
public Iterator < IExecutionBridge > getJobsPage ( final int _start , final int _size ) { } }

implementation: final int min = Math . min ( _size , this . executionBridges . size ( ) ) ; return new ArrayList < > ( this . executionBridges . subList ( _start , min ) ) . iterator ( ) ;


signature:
public class EFapsSession { /** * Gets the bridge for job .
 * @ param _ jobName the _ job name
 * @ param _ prune the _ prune
 * @ return the bridge4 job */
public IExecutionBridge getBridge4Job ( final String _jobName , final boolean _prune ) { } }

implementation: IExecutionBridge ret = null ; for ( final IExecutionBridge bridge : this . executionBridges ) { if ( bridge . getJobName ( ) . equals ( _jobName ) ) { ret = bridge ; if ( _prune && ret . isFinished ( ) ) { this . executionBridges . remove ( ret ) ; } break ; } } return ret ;


signature:
public class EFapsSession { /** * Method to check if a user is checked in .
 * @ return true if a user is checked in , else false
 * @ see # userName */
public boolean isLogedIn ( ) { } }

implementation: boolean ret = false ; if ( this . userName != null ) { ret = true ; } else if ( ! isSessionInvalidated ( ) ) { ret = lazyLogin ( ) ; } return ret ;


signature:
public class EFapsSession { /** * Lazy login is used in copmination with a Single Sign On mechanism .
 * @ return true , if successful */
private boolean lazyLogin ( ) { } }

implementation: boolean ret = false ; final HttpServletRequest httpRequest = ( ( ServletWebRequest ) RequestCycle . get ( ) . getRequest ( ) ) . getContainerRequest ( ) ; final HttpSession httpSession = httpRequest . getSession ( false ) ; if ( httpSession != null && ! ( httpSession instanceof HttpSessionCopy ) ) { for ( final ILoginProvider loginProvider : EFapsApplication . get ( ) . getLoginProviders ( ) ) { this . userName = loginProvider . login ( httpSession ) ; if ( this . userName != null ) { break ; } } if ( this . userName != null ) { openContext ( ) ; try { setAttribute ( EFapsSession . LOGIN_ATTRIBUTE_NAME , this . userName ) ; this . sessionAttributes . put ( UserAttributesSet . CONTEXTMAPKEY , new UserAttributesSet ( this . userName ) ) ; } catch ( final EFapsException e ) { EFapsSession . LOG . error ( "Problems with setting UserAttribues." , e ) ; } RegistryManager . registerUserSession ( this . userName , getId ( ) ) ; ret = true ; RequestCycle . get ( ) . setResponsePage ( GatherInfoPage . class ) ; } } return ret ;


signature:
public class EFapsSession { /** * Method to log a user with the Parameters from the Request in .
 * @ see # checkLogin ( String , String ) */
public final void login ( ) { } }

implementation:
final IRequestParameters paras = RequestCycle . get ( ) . getRequest ( ) . getRequestParameters ( ) ; final StringValue name = paras . getParameterValue ( "name" ) ; final StringValue pwd = paras . getParameterValue ( "password" ) ; if ( checkLogin ( name . toString ( ) , pwd . toString ( ) ) ) { this . userName = name . toString ( ) ; // on login a valid Context for the User must be opened to ensure that the
// session attributes that depend on the user are set correctly before any
// further requests are made ( e . g . setting the current company
openContext ( ) ; setAttribute ( EFapsSession . LOGIN_ATTRIBUTE_NAME , this . userName ) ; RegistryManager . registerUserSession ( this . userName , getId ( ) ) ; } else { this . userName = null ; this . sessionAttributes . clear ( ) ; }


signature:
public class EFapsSession { /** * Logs a user out and stores the UserAttribues in the eFaps database . */
public final void logout ( ) { } }

implementation: if ( this . sessionAttributes . containsKey ( UserAttributesSet . CONTEXTMAPKEY ) ) { try { UsageRegistry . store ( ) ; ( ( UserAttributesSet ) this . sessionAttributes . get ( UserAttributesSet . CONTEXTMAPKEY ) ) . storeInDb ( ) ; AccessCache . clean4Person ( Context . getThreadContext ( ) . getPersonId ( ) ) ; } catch ( final EFapsException e ) { EFapsSession . LOG . error ( "Error on logout" , e ) ; } finally { this . sessionAttributes . clear ( ) ; removeAttribute ( EFapsSession . LOGIN_ATTRIBUTE_NAME ) ; invalidate ( ) ; } } closeContext ( ) ; this . userName = null ;


signature:
public class EFapsSession { /** * method to check the LoginInformation ( Name and Password ) against the
 * eFapsDatabase . To check the Information a Context is opened an afterwards
 * closed . It also puts a new Instance of UserAttributes into the instance
 * map { @ link # sessionAttributes } . The person returned must have at least one
 * role asigned to be confirmed as value .
 * @ param _ name Name of the User to be checked in
 * @ param _ passwd Password of the User to be checked in
 * @ return true if LoginInformation was valid , else false */
private boolean checkLogin ( final String _name , final String _passwd ) { } }

implementation:
boolean loginOk = false ; try { if ( Context . isTMActive ( ) ) { Context . getThreadContext ( ) ; } else { Context . begin ( ) ; } boolean ok = false ; try { // on a new login the cache for Person is reseted
Person . reset ( _name ) ; final EFapsApplication app = ( EFapsApplication ) getApplication ( ) ; final LoginHandler loginHandler = new LoginHandler ( app . getApplicationKey ( ) ) ; final Person person = loginHandler . checkLogin ( _name , _passwd ) ; if ( person != null && ! person . getRoles ( ) . isEmpty ( ) ) { loginOk = true ; this . sessionAttributes . put ( UserAttributesSet . CONTEXTMAPKEY , new UserAttributesSet ( _name ) ) ; } ok = true ; } finally { if ( ok && Context . isTMActive ( ) ) { Context . commit ( ) ; } else { if ( Context . isTMMarkedRollback ( ) ) { EFapsSession . LOG . error ( "transaction is marked to roll back" ) ; } else { EFapsSession . LOG . error ( "transaction manager in undefined status" ) ; } Context . rollback ( ) ; } } } catch ( final EFapsException e ) { EFapsSession . LOG . error ( "could not check name and password" , e ) ; } return loginOk ;


signature:
public class EFapsSession { /** * Method that opens a new Context in eFaps , setting the User , the Locale ,
 * the Attributes of this Session { @ link # sessionAttributes } and the
 * RequestParameters for the Context .
 * @ see # attach ( ) */
public void openContext ( ) { } }

implementation:
if ( isLogedIn ( ) ) { try { if ( ! Context . isTMActive ( ) ) { final ServletWebRequest request = ( ServletWebRequest ) RequestCycle . get ( ) . getRequest ( ) ; if ( request instanceof EFapsRequest || request instanceof EFapsMultipartRequest ) { final Map < String , String [ ] > parameters = new HashMap < > ( ) ; final IRequestParameters reqPara = request . getRequestParameters ( ) ; for ( final String name : reqPara . getParameterNames ( ) ) { final List < StringValue > values = reqPara . getParameterValues ( name ) ; final String [ ] valArray ; if ( values == null ) { valArray = ArrayUtils . EMPTY_STRING_ARRAY ; } else { valArray = new String [ values . size ( ) ] ; int i = 0 ; for ( final StringValue value : values ) { valArray [ i ] = value . toString ( ) ; i ++ ; } } parameters . put ( name , valArray ) ; } Context . begin ( this . userName , super . getLocale ( ) , this . sessionAttributes , parameters , null , Context . Inheritance . Inheritable ) ; // set the locale in the context and in the session
setLocale ( Context . getThreadContext ( ) . getLocale ( ) ) ; setAttribute ( UserAttributesSet . CONTEXTMAPKEY , Context . getThreadContext ( ) . getUserAttributes ( ) ) ; Context . getThreadContext ( ) . setPath ( request . getContextPath ( ) ) ; } } } catch ( final EFapsException e ) { EFapsSession . LOG . error ( "could not initialise the context" , e ) ; throw new RestartResponseException ( new ErrorPage ( e ) ) ; } }


signature:
public class EFapsSession { /** * Method that closes the opened Context { @ link # openContext ( ) } , by
 * committing or rollback it .
 * @ see # detach ( ) */
public void closeContext ( ) { } }

implementation: if ( isLogedIn ( ) ) { try { if ( ! Context . isTMNoTransaction ( ) ) { if ( Context . isTMActive ( ) ) { Context . commit ( ) ; } else { Context . rollback ( ) ; } } } catch ( final SecurityException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final IllegalStateException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } }


signature:
public class CheckoutServlet { /** * The method checks the file from the object out and returns them
 * in a output stream to the web client . The object
 * id must be given with paramter { @ link # PARAM _ OID } . < br / >
 * @ param _ req request variable
 * @ param _ res response variable
 * @ throws ServletException on error */
@ Override protected void doGet ( final HttpServletRequest _req , final HttpServletResponse _res ) throws ServletException { } }

implementation: final String oid = _req . getParameter ( CheckoutServlet . PARAM_OID ) ; try { final Instance instance = Instance . get ( oid ) ; if ( instance . isValid ( ) ) { final Checkout checkout = new Checkout ( instance ) ; final InputStream input = checkout . execute ( ) ; _res . setContentType ( this . getServletContext ( ) . getMimeType ( checkout . getFileName ( ) ) ) ; _res . setContentLength ( ( int ) checkout . getFileLength ( ) ) ; _res . addHeader ( "Content-Disposition" , "inline; filename=\"" + checkout . getFileName ( ) + "\"" ) ; IOUtils . copy ( input , _res . getOutputStream ( ) ) ; } } catch ( final IOException e ) { throw new ServletException ( e ) ; } catch ( final EFapsException e ) { throw new ServletException ( e ) ; }


signature:
public class QueryRequestBuilder { /** * Adds indexes to the indexes parameter
 * @ param index0 The first index
 * @ param indexes The remaining indexes
 * @ return this */
public QueryRequestBuilder addIndexes ( final ResourceIdentifier index0 , final ResourceIdentifier ... indexes ) { } }

implementation: this . indexes . add ( index0 ) ; this . indexes . addAll ( Arrays . asList ( indexes ) ) ; return this ;


signature:
public class UICmdObject { /** * Gets the model .
 * @ param _ cmdId the cmd id
 * @ param _ instance the instance
 * @ return the model */
public static IModel < ICmdUIObject > getModel ( final Long _cmdId , final Instance _instance ) { } }

implementation: return Model . < ICmdUIObject > of ( UICmdObject . get ( _cmdId ) . setInstance ( _instance ) ) ;


signature:
public class StringUIFactory { /** * { @ inheritDoc } */
@ Override public Component getEditable ( final String _wicketId , final AbstractUIField _uiField ) throws EFapsException { } }

implementation: Component ret = null ; if ( applies ( _uiField ) ) { switch ( _uiField . getFieldConfiguration ( ) . getUIType ( ) ) { case DEFAULT : ret = new StringField ( _wicketId , Model . of ( _uiField ) , _uiField . getFieldConfiguration ( ) ) ; break ; case BUTTON : case CHECKBOX : case DROPDOWN : case RADIO : case SNIPPLET : ret = ( ( UITypeFactory ) UITypeFactory . get ( ) ) . getEditableComp ( _wicketId , _uiField ) ; break ; default : break ; } } return ret ;


signature:
public class StringUIFactory { /** * { @ inheritDoc } */
@ Override protected String getReadOnlyValue ( final AbstractUIField _uiField ) throws EFapsException { } }

implementation: Object obj = _uiField . getValue ( ) . getReadOnlyValue ( _uiField . getParent ( ) . getMode ( ) ) ; if ( obj != null && obj instanceof Collection ) { obj = StringUtils . join ( ( ( Collection < ? > ) obj ) . iterator ( ) , ", " ) ; } return obj == null ? "" : String . valueOf ( obj ) ;


signature:
public class AbstractUIFactory { /** * { @ inheritDoc } */
@ Override public Component getReadOnly ( final String _wicketId , final AbstractUIField _uiField ) throws EFapsException { } }

implementation: Component ret = null ; if ( applies ( _uiField ) ) { String icon = _uiField . getFieldConfiguration ( ) . getField ( ) . getIcon ( ) ; if ( icon == null && _uiField . getInstance ( ) != null && _uiField . getFieldConfiguration ( ) . getField ( ) . isShowTypeIcon ( ) && _uiField . getInstance ( ) . getType ( ) != null ) { final Image image = Image . getTypeIcon ( _uiField . getInstance ( ) . getType ( ) ) ; if ( image != null ) { icon = image . getName ( ) ; } } final String readonly = getReadOnlyValue ( _uiField ) ; _uiField . setPickListValue ( readonly ) ; if ( icon == null ) { ret = new LabelField ( _wicketId , Model . of ( readonly ) , _uiField ) ; } else { ret = new IconLabelField ( _wicketId , Model . of ( _uiField ) , readonly , icon ) ; } } return ret ;


signature:
public class AbstractContentPage { /** * Method that adds the Components to the Page .
 * @ param _ form FormContainer
 * @ throws EFapsException on error */
@ SuppressWarnings ( "unchecked" ) protected void addComponents ( final FormContainer _form ) throws EFapsException { } }

implementation:
this . form = _form ; add ( new KeepAliveBehavior ( ) ) ; // set the title for the Page
add2Page ( new Label ( "pageTitle" , DBProperties . getProperty ( "Logo.Version.Label" ) ) ) ; add ( new SetMessageStatusBehavior ( ) ) ; add ( this . modal ) ; final AbstractUIObject uiObject = ( AbstractUIObject ) super . getDefaultModelObject ( ) ; add ( new HeadingPanel ( "titel" , Model . of ( new UIHeading ( uiObject . getTitle ( ) ) ) ) ) ; IModel < UIMenuItem > model = null ; if ( uiObject . getMode ( ) == TargetMode . SEARCH && uiObject . getCallingCommandUUID ( ) != null && uiObject instanceof UIForm ) { model = Model . of ( new UISearchItem ( uiObject . getCallingCommand ( ) . getTargetSearch ( ) . getUUID ( ) ) ) ; } else if ( uiObject . getCommand ( ) . getTargetMenu ( ) != null ) { model = Model . of ( new UIMenuItem ( uiObject . getCommand ( ) . getTargetMenu ( ) . getUUID ( ) , uiObject . getInstanceKey ( ) ) ) ; } add ( new MenuBarPanel ( "menu" , model ) ) ; add ( new HelpLink ( "help" , Model . of ( uiObject . getCommand ( ) . getId ( ) ) ) ) ; final WebMarkupContainer footerpanel ; if ( uiObject . isCreateMode ( ) || uiObject . isEditMode ( ) || uiObject . isSearchMode ( ) || uiObject . isOpenedByPicker ( ) ) { footerpanel = new FooterPanel ( "footer" , ( IModel < ICmdUIObject > ) getDefaultModel ( ) , this . modalWindow ) ; } else { footerpanel = new WebMarkupContainer ( "footer" ) ; footerpanel . setVisible ( false ) ; } add ( footerpanel ) ;


signature:
public class AbstractMergePage { /** * Adds a child component to this container or to the body .
 * @ param _ childs childrne to add
 * @ return the markup container
 * @ throws IllegalArgumentException Thrown if a child with the same id is replaced by the add operation . */
@ Override public MarkupContainer add ( final Component ... _childs ) { } }

implementation: MarkupContainer ret = null ; for ( final Component child : _childs ) { if ( child instanceof HtmlHeaderContainer ) { ret = add2Page ( child ) ; } else { ret = body . add ( _childs ) ; } } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * On submit the action must be done .
 * @ param _ target AjaxRequestTarget */
@ Override public void onRequest ( final AjaxRequestTarget _target ) { } }

implementation:
AjaxSubmitCloseButton . LOG . trace ( "entering onSubmit" ) ; final String [ ] oids = ParameterUtil . parameter2Array ( getRequest ( ) . getRequestParameters ( ) , "selectedRow" ) ; final Map < String , String [ ] > others = new HashMap < > ( ) ; others . put ( "selectedRow" , oids ) ; final ICmdUIObject cmdUIObject = ( ICmdUIObject ) getDefaultModelObject ( ) ; final List < Classification > classifications = new ArrayList < > ( ) ; try { if ( cmdUIObject instanceof UIForm ) { final UIForm uiform = ( UIForm ) cmdUIObject ; others . putAll ( uiform . getNewValues ( ) ) ; // if the form contains classifications , they are added to a list and passed on to the esjp
if ( uiform . isClassified ( ) ) { for ( final Element element : uiform . getElements ( ) ) { if ( element . getType ( ) . equals ( ElementType . SUBFORM ) ) { final UIFieldForm uifieldform = ( UIFieldForm ) element . getElement ( ) ; classifications . add ( ( Classification ) Type . get ( uifieldform . getClassificationUUID ( ) ) ) ; } } } } if ( convertDateFieldValues ( _target ) && convertFieldValues ( _target ) && checkForRequired ( _target ) && validateFieldValues ( _target ) && validateForm ( _target , others , classifications ) ) { if ( executeEvents ( _target , others , classifications ) ) { // to be able to see the changes the context must be commited and reopened
( ( EFapsSession ) Session . get ( ) ) . saveContext ( ) ; if ( cmdUIObject . getCommand ( ) . getTargetCommand ( ) != null ) { final AbstractCommand targetCmd = cmdUIObject . getCommand ( ) . getTargetCommand ( ) ; final AbstractUIPageObject newUIObject ; final PagePosition pp = cmdUIObject instanceof IPageObject ? ( ( IPageObject ) cmdUIObject ) . getPagePosition ( ) : PagePosition . CONTENT ; if ( targetCmd . getTargetTable ( ) != null ) { newUIObject = new UITable ( cmdUIObject . getCommand ( ) . getTargetCommand ( ) . getUUID ( ) , cmdUIObject . getInstance ( ) == null ? null : cmdUIObject . getInstance ( ) . getOid ( ) ) . setPagePosition ( pp ) ; } else { newUIObject = new UIForm ( cmdUIObject . getCommand ( ) . getTargetCommand ( ) . getUUID ( ) , cmdUIObject . getInstance ( ) == null ? null : cmdUIObject . getInstance ( ) . getOid ( ) ) . setPagePosition ( pp ) ; } final UIWizardObject wizard = new UIWizardObject ( ( IWizardElement ) newUIObject ) ; wizard . addParameters ( ( IWizardElement ) cmdUIObject , Context . getThreadContext ( ) . getParameters ( ) ) ; wizard . insertBefore ( ( IWizardElement ) cmdUIObject ) ; newUIObject . setWizard ( wizard ) ; newUIObject . setPartOfWizardCall ( true ) ; newUIObject . setRenderRevise ( cmdUIObject . getCommand ( ) . isTargetCmdRevise ( ) ) ; if ( cmdUIObject . getCommand ( ) . isSubmit ( ) ) { newUIObject . setSubmit ( true ) ; // newUIObject . setCallingCommandUUID ( this . uiObject . getCallingCommandUUID ( ) ) ;
} final FooterPanel footer = findParent ( FooterPanel . class ) ; final ModalWindowContainer modal = footer . getModalWindow ( ) ; final AbstractContentPage page ; if ( targetCmd . getTargetTable ( ) != null ) { page = new TablePage ( Model . of ( ( UITable ) newUIObject ) , modal ) ; } else { page = new FormPage ( Model . of ( ( UIForm ) newUIObject ) , modal ) ; } if ( cmdUIObject . getCommand ( ) . isTargetShowFile ( ) ) { page . getDownloadBehavior ( ) . initiate ( ) ; } getRequestCycle ( ) . setResponsePage ( page ) ; } else { final FooterPanel footer = findParent ( FooterPanel . class ) ; // if inside a modal
switch ( ( ( IPageObject ) getPage ( ) . getDefaultModelObject ( ) ) . getPagePosition ( ) ) { case PICKER : case CONTENTMODAL : case TREEMODAL : footer . getModalWindow ( ) . setReloadChild ( ! cmdUIObject . getCommand ( ) . isNoUpdateAfterCmd ( ) ) ; footer . getModalWindow ( ) . setTargetShowFile ( cmdUIObject . getCommand ( ) . isTargetShowFile ( ) ) ; footer . getModalWindow ( ) . close ( _target , cmdUIObject ) ; break ; default : break ; } footer . setSuccess ( true ) ; } } } } catch ( final EFapsException e ) { final ModalWindowContainer modal = ( ( AbstractContentPage ) getPage ( ) ) . getModal ( ) ; modal . setPageCreator ( new ModalWindow . PageCreator ( ) { private static final long serialVersionUID = 1L ; @ Override public Page createPage ( ) { return new ErrorPage ( e ) ; } } ) ; modal . show ( _target ) ; }


signature:
public class AjaxSubmitCloseButton { /** * Method used to convert the date value from the ui in date values for
 * eFaps .
 * @ param _ target AjaxRequestTarget
 * @ return true if converted successfully , else false
 * @ throws EFapsException on error */
private boolean convertDateFieldValues ( final AjaxRequestTarget _target ) throws EFapsException { } }

implementation:
AjaxSubmitCloseButton . LOG . trace ( "entering convertDateFieldValues" ) ; boolean ret = true ; final StringBuilder html = new StringBuilder ( ) ; html . append ( "
" ) ; final EFapsRequestParametersAdapter parameters = ( EFapsRequestParametersAdapter ) getRequest ( ) . getRequestParameters ( ) ; final Set < String > names = parameters . getParameterNames ( ) ; for ( final DateTimePanel datepicker : ( ( FormContainer ) getForm ( ) ) . getDateComponents ( ) ) { if ( names . contains ( datepicker . getDateFieldName ( ) ) ) { final List < StringValue > date = parameters . getParameterValues ( datepicker . getDateFieldName ( ) ) ; final List < StringValue > hour = parameters . getParameterValues ( datepicker . getHourFieldName ( ) ) ; final List < StringValue > minute = parameters . getParameterValues ( datepicker . getMinuteFieldName ( ) ) ; final List < StringValue > ampm = parameters . getParameterValues ( datepicker . getAmPmFieldName ( ) ) ; ret = datepicker . validate ( date , hour , minute , ampm , html ) ; if ( ret ) { parameters . setParameterValues ( datepicker . getFieldName ( ) , datepicker . getDateAsString ( date , hour , minute , ampm ) ) ; } else { break ; } } } if ( ! ret ) { html . append ( "
" ) ; showDialog ( _target , html . toString ( ) , true , false ) ; } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Method used to convert the values from the ui in values for
 * eFaps .
 * @ param _ target AjaxRequestTarget
 * @ return true if converted successfully , else false
 * @ throws EFapsException on error */
private boolean convertFieldValues ( final AjaxRequestTarget _target ) throws EFapsException { } }

implementation: AjaxSubmitCloseButton . LOG . trace ( "entering convertFieldValues" ) ; final EFapsRequestParametersAdapter parameters = ( EFapsRequestParametersAdapter ) getRequest ( ) . getRequestParameters ( ) ; final FormContainer frmContainer = ( FormContainer ) getForm ( ) ; for ( final IValueConverter converter : frmContainer . getValueConverters ( ) ) { converter . convertValue ( parameters ) ; } return true ;


signature:
public class AjaxSubmitCloseButton { /** * Method is not used , but needed from the api .
 * @ param _ target AjaxRequestTarget */
@ Override public void onError ( final AjaxRequestTarget _target ) { } }

implementation:
final FeedbackCollector collector = new FeedbackCollector ( getForm ( ) . getPage ( ) ) ; final List < FeedbackMessage > msgs = collector . collect ( ) ; final ErrorMessageResource msgResource = new ErrorMessageResource ( ) ; final StringBuilder html = new StringBuilder ( ) . append ( "
" ) ; for ( final FeedbackMessage msg : msgs ) { if ( ! ( msg . getReporter ( ) instanceof Form ) ) { if ( msg . getReporter ( ) instanceof AutoCompleteComboBox ) { final StringBuilder js = new StringBuilder ( ) . append ( "domClass.add(dom.byId('" ) . append ( msg . getReporter ( ) . getMarkupId ( ) ) . append ( "').parentNode, 'invalid');" ) ; _target . prependJavaScript ( DojoWrapper . require ( js , DojoClasses . dom , DojoClasses . domClass ) ) ; } else { msg . getReporter ( ) . add ( AttributeModifier . append ( "class" , "invalid" ) ) ; _target . add ( msg . getReporter ( ) ) ; } } Serializable warn = null ; if ( msg . getMessage ( ) instanceof ValidationErrorFeedback ) { // look if a message was set
warn = ( ( ValidationErrorFeedback ) msg . getMessage ( ) ) . getMessage ( ) ; // still no message , create one
if ( warn == null ) { warn = ( ( ValidationErrorFeedback ) msg . getMessage ( ) ) . getError ( ) . getErrorMessage ( msgResource ) ; } } else { warn = String . valueOf ( msg . getMessage ( ) ) ; } html . append ( "
" ) ; if ( msg . getReporter ( ) instanceof IFieldConfig ) { html . append ( "" ) . append ( ( ( IFieldConfig ) msg . getReporter ( ) ) . getFieldConfig ( ) . getLabel ( ) ) . append ( ":	" ) . append ( warn ) . append ( "	" ) ; } else { html . append ( "" ) . append ( warn ) . append ( "
" ) ; } msg . getReporter ( ) . getFeedbackMessages ( ) . clear ( ) ; } html . append ( "
" ) ; showDialog ( _target , html . toString ( ) , true , false ) ; // after every commit the fieldset must be reseted
getForm ( ) . getPage ( ) . visitChildren ( SetDataGrid . class , ( _setDataGrid , _visit ) -> { final UIFieldSet fieldSet = ( UIFieldSet ) _setDataGrid . getDefaultModelObject ( ) ; fieldSet . resetIndex ( ) ; } ) ; getForm ( ) . getPage ( ) . visitChildren ( DropDownField . class , ( _dropDown , _visit ) -> ( ( DropDownField ) _dropDown ) . setConverted ( false ) ) ;


signature:
public class AjaxSubmitCloseButton { /** * Execute the events which are related to CommandAbstract calling the Form .
 * @ param _ target AjaxRequestTarget to be used in the case a ModalPage
 * should be called
 * @ param _ other Parameters to be passed on to the Event , defined as
 * { @ link org . efaps . admin . event . Parameter . ParameterValues . OTHERS }
 * @ param _ classifications List of uuid of classifcationsto be passed on
 * to the Event , defined as
 * { @ link org . efaps . admin . event . Parameter . ParameterValues . OTHERS }
 * @ return true if the events where executed successfully , otherwise false
 * @ throws EFapsException on error */
private boolean executeEvents ( final AjaxRequestTarget _target , final Map < String , String [ ] > _other , final List < Classification > _classifications ) throws EFapsException { } }

implementation: AjaxSubmitCloseButton . LOG . trace ( "entering executeEvents" ) ; boolean ret = true ; final ICmdUIObject cmdUIObject = ( ICmdUIObject ) getPage ( ) . getDefaultModelObject ( ) ; final TargetMode mode ; if ( cmdUIObject instanceof IModeObject ) { mode = ( ( IModeObject ) cmdUIObject ) . getMode ( ) ; } else { mode = TargetMode . UNKNOWN ; } final List < Object > tuplets = new ArrayList < > ( ) ; tuplets . add ( ParameterValues . OTHERS ) ; tuplets . add ( _other ) ; tuplets . add ( ParameterValues . ACCESSMODE ) ; tuplets . add ( mode ) ; if ( cmdUIObject instanceof AbstractUIPageObject ) { tuplets . add ( ParameterValues . OIDMAP4UI ) ; tuplets . add ( ( ( AbstractUIPageObject ) getForm ( ) . getPage ( ) . getDefaultModelObject ( ) ) . getUiID2Oid ( ) ) ; } if ( _classifications . size ( ) > 0 ) { tuplets . add ( ParameterValues . CLASSIFICATIONS ) ; tuplets . add ( _classifications ) ; } final List < Return > returns = cmdUIObject . executeEvents ( EventType . UI_COMMAND_EXECUTE , tuplets . toArray ( ) ) ; for ( final Return oneReturn : returns ) { if ( oneReturn . get ( ReturnValues . TRUE ) == null && ! oneReturn . isEmpty ( ) && oneReturn . get ( ReturnValues . VALUES ) instanceof String ) { boolean sniplett = false ; String key = ( String ) oneReturn . get ( ReturnValues . VALUES ) ; if ( key == null ) { key = ( String ) oneReturn . get ( ReturnValues . SNIPLETT ) ; sniplett = true ; } showDialog ( _target , key , sniplett , false ) ; ret = false ; break ; } else if ( oneReturn . get ( ReturnValues . TRUE ) != null && ! oneReturn . isEmpty ( ) && cmdUIObject . getCommand ( ) . isTargetShowFile ( ) ) { if ( oneReturn . get ( ReturnValues . VALUES ) instanceof File ) { final File file = ( File ) oneReturn . get ( ReturnValues . VALUES ) ; ( ( EFapsSession ) getSession ( ) ) . setFile ( file ) ; } } if ( oneReturn . get ( ReturnValues . INSTANCE ) != null && cmdUIObject instanceof AbstractInstanceObject ) { ( ( AbstractInstanceObject ) cmdUIObject ) . setInstanceKey ( ( ( Instance ) oneReturn . get ( ReturnValues . INSTANCE ) ) . getKey ( ) ) ; } } if ( cmdUIObject instanceof AbstractUIPageObject && ( ( AbstractUIPageObject ) cmdUIObject ) . isOpenedByPicker ( ) ) { final PageReference pageRef = ( ( AbstractContentPage ) getForm ( ) . getPage ( ) ) . getCalledByPageReference ( ) ; ( ( AbstractUIPageObject ) cmdUIObject ) . getPicker ( ) . executeEvents ( EventType . UI_COMMAND_EXECUTE , ParameterValues . OTHERS , _other ) ; ( ( AbstractUIObject ) pageRef . getPage ( ) . getDefaultModelObject ( ) ) . setPicker ( ( ( AbstractUIPageObject ) cmdUIObject ) . getPicker ( ) ) ; } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Method to validate the values for fields .
 * @ param _ target AjaxRequestTarget
 * @ return true if validation was valid , else false
 * @ throws EFapsException on error */
private boolean validateFieldValues ( final AjaxRequestTarget _target ) throws EFapsException { } }

implementation:
AjaxSubmitCloseButton . LOG . trace ( "entering validateFieldValues" ) ; boolean ret = true ; final ICmdUIObject uiobject = ( ICmdUIObject ) getPage ( ) . getDefaultModelObject ( ) ; final StringBuilder html = new StringBuilder ( ) ; html . append ( "
" ) ; if ( uiobject instanceof UIForm ) { final UIForm uiform = ( UIForm ) uiobject ; ret = evalFormElement ( _target , html , uiform ) ; } if ( ! ret ) { html . append ( "
" ) ; showDialog ( _target , html . toString ( ) , true , false ) ; } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Recursive method to validate the elements of the form .
 * @ param _ target AjaxRequestTarget
 * @ param _ html StringBuilder for the warning message
 * @ param _ uiform UIForm to start the validation
 * @ return true if validation was valid , else false
 * @ throws EFapsException on error */
private boolean evalFormElement ( final AjaxRequestTarget _target , final StringBuilder _html , final UIForm _uiform ) throws EFapsException { } }

implementation: AjaxSubmitCloseButton . LOG . trace ( "entering evalFormElement" ) ; boolean ret = true ; for ( final Element element : _uiform . getElements ( ) ) { if ( element . getType ( ) . equals ( ElementType . FORM ) ) { final FormElement formElement = ( FormElement ) element . getElement ( ) ; for ( final Iterator < FormRow > uiRowIter = formElement . getRowModels ( ) ; uiRowIter . hasNext ( ) ; ) { for ( final IUIElement object : uiRowIter . next ( ) . getValues ( ) ) { } } } else if ( element . getType ( ) . equals ( ElementType . SUBFORM ) ) { final UIFieldForm uiFieldForm = ( UIFieldForm ) element . getElement ( ) ; final boolean tmp = evalFormElement ( _target , _html , uiFieldForm ) ; ret = ret ? tmp : ret ; } else if ( element . getType ( ) . equals ( ElementType . TABLE ) ) { final UIFieldTable uiFieldTable = ( UIFieldTable ) element . getElement ( ) ; final List < UITableHeader > headers = uiFieldTable . getHeaders ( ) ; for ( final UIRow uiRow : uiFieldTable . getValues ( ) ) { uiRow . getUserinterfaceId ( ) ; final Iterator < UITableHeader > headerIter = headers . iterator ( ) ; for ( final IFilterable filterable : uiRow . getCells ( ) ) { headerIter . next ( ) ; } } } } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Executes the Validation - Events related to the CommandAbstract which
 * called this Form .
 * @ param _ target AjaxRequestTarget to be used in the case a ModalPage
 * should be called
 * @ param _ other other parameters
 * @ param _ classifications lis of classifications
 * @ return true if the Validation was valid , otherwise false
 * @ throws EFapsException on error */
private boolean validateForm ( final AjaxRequestTarget _target , final Map < String , String [ ] > _other , final List < Classification > _classifications ) throws EFapsException { } }

implementation:
AjaxSubmitCloseButton . LOG . trace ( "entering validateForm" ) ; boolean ret = true ; if ( ! this . validated ) { final TargetMode mode ; if ( getForm ( ) . getPage ( ) . getDefaultModelObject ( ) instanceof IModeObject ) { mode = ( ( IModeObject ) getForm ( ) . getPage ( ) . getDefaultModelObject ( ) ) . getMode ( ) ; } else { mode = TargetMode . UNKNOWN ; } final List < Object > tuplets = new ArrayList < > ( ) ; tuplets . add ( ParameterValues . OTHERS ) ; tuplets . add ( _other ) ; tuplets . add ( ParameterValues . ACCESSMODE ) ; tuplets . add ( mode ) ; if ( getPage ( ) . getDefaultModelObject ( ) instanceof AbstractUIPageObject ) { tuplets . add ( ParameterValues . OIDMAP4UI ) ; tuplets . add ( ( ( AbstractUIPageObject ) getForm ( ) . getPage ( ) . getDefaultModelObject ( ) ) . getUiID2Oid ( ) ) ; } if ( _classifications . size ( ) > 0 ) { tuplets . add ( ParameterValues . CLASSIFICATIONS ) ; tuplets . add ( _classifications ) ; } final List < Return > returns = ( ( ICmdUIObject ) getPage ( ) . getDefaultModelObject ( ) ) . executeEvents ( EventType . UI_VALIDATE , tuplets . toArray ( ) ) ; boolean goOn = true ; boolean sniplett = false ; String key = "" ; for ( final Return oneReturn : returns ) { if ( oneReturn . get ( ReturnValues . VALUES ) != null || oneReturn . get ( ReturnValues . SNIPLETT ) != null ) { if ( oneReturn . get ( ReturnValues . VALUES ) != null ) { key = key + ( String ) oneReturn . get ( ReturnValues . VALUES ) ; } else { key = key + ( String ) oneReturn . get ( ReturnValues . SNIPLETT ) ; sniplett = true ; } ret = false ; if ( oneReturn . get ( ReturnValues . TRUE ) == null ) { goOn = false ; } } else { if ( oneReturn . get ( ReturnValues . TRUE ) == null ) { ret = false ; // that is the case if it is wrong configured !
} } } if ( ! ret ) { showDialog ( _target , key , sniplett , goOn ) ; } } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Method checking if the mandatory field of the Form are filled with a value ,
 * and if not opens a WarnDialog and marks the fields in the Form via Ajax .
 * @ param _ target RequestTarget used for this Request
 * @ return true if all mandatory fields are filled , else false */
private boolean checkForRequired ( final AjaxRequestTarget _target ) { } }

implementation: AjaxSubmitCloseButton . LOG . trace ( "entering checkForRequired" ) ; boolean ret = true ; if ( ! ( getForm ( ) . getParent ( ) . getDefaultModel ( ) instanceof TableModel ) ) { final IRequestParameters parameters = getRequest ( ) . getRequestParameters ( ) ; final List < FormPanel > panels = getFormPanels ( ) ; for ( final FormPanel panel : panels ) { for ( final Entry < String , Label > entry : panel . getRequiredComponents ( ) . entrySet ( ) ) { final StringValue value = parameters . getParameterValue ( entry . getKey ( ) ) ; if ( value . isNull ( ) || value . isEmpty ( ) ) { final Label label = entry . getValue ( ) ; label . add ( AttributeModifier . replace ( "class" , "eFapsFormLabelRequiredForce" ) ) ; _target . add ( label ) ; ret = false ; } } } if ( ! ret ) { showDialog ( _target , "MandatoryDialog" , false , false ) ; } } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Method to get the FormPanel of this Page .
 * @ return FormPanel */
private List < FormPanel > getFormPanels ( ) { } }

implementation: AjaxSubmitCloseButton . LOG . trace ( "entering getFormPanels" ) ; final List < FormPanel > ret = new ArrayList < > ( ) ; final Iterator < ? > iterator = getForm ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { final Object object = iterator . next ( ) ; if ( object instanceof WebMarkupContainer ) { final Iterator < ? > iterator2 = ( ( WebMarkupContainer ) object ) . iterator ( ) ; while ( iterator2 . hasNext ( ) ) { final Object object2 = iterator2 . next ( ) ; if ( object2 instanceof FormPanel ) { ret . add ( ( FormPanel ) object2 ) ; } } } } return ret ;


signature:
public class AjaxSubmitCloseButton { /** * Shows a modal DialogPage .
 * @ param _ target AjaxRequestTarget to be used for opening the modal
 * DialogPage
 * @ param _ key the Key to get the DBProperties from the eFapsDataBaase or a
 * code sniplett
 * @ param _ isSniplett is the parameter _ key a key to a property or a
 * sniplett
 * @ param _ goOnButton should a button to go on be rendered */
private void showDialog ( final AjaxRequestTarget _target , final String _key , final boolean _isSniplett , final boolean _goOnButton ) { } }

implementation: final ModalWindowContainer modal = ( ( AbstractContentPage ) getPage ( ) ) . getModal ( ) ; modal . setInitialWidth ( 350 ) ; modal . setInitialHeight ( 200 ) ; modal . setPageCreator ( new ModalWindow . PageCreator ( ) { private static final long serialVersionUID = 1L ; @ Override public Page createPage ( ) { return new DialogPage ( ( ( AbstractContentPage ) getPage ( ) ) . getPageReference ( ) , _key , _isSniplett , _goOnButton ) ; } } ) ; if ( _goOnButton ) { modal . setWindowClosedCallback ( new WindowClosedCallback ( ) { private static final long serialVersionUID = 1L ; @ Override public void onClose ( final AjaxRequestTarget _target ) { if ( AjaxSubmitCloseButton . this . validated ) { _target . appendJavaScript ( getExecuteScript ( ) ) ; } } } ) ; } modal . show ( _target ) ;


signature:
public class TransactionFilter { /** * Called by the web container to indicate to a filter that it is being
 * placed into service . The servlet container calls the init method exactly
 * once after instantiating the filter . The init method must complete
 * successfully before the filter is asked to do any filtering work . The web
 * container cannot place the filter into service if the init method either
 * < ol >
 * < li > Throws a ServletException < / li >
 * < li > Does not return within a time period defined by the web container < / li >
 * < / ol >
 * @ param _ filterConfig filterconfig
 * @ throws ServletException on error */
@ Override public void init ( final FilterConfig _filterConfig ) throws ServletException { } }

implementation: super . init ( _filterConfig ) ; final String root = "/" + _filterConfig . getServletContext ( ) . getServletContextName ( ) + "/" ; this . notLoggedInForward = "/" + _filterConfig . getInitParameter ( TransactionFilter . INIT_PARAM_URL_LOGIN_PAGE ) ; if ( this . notLoggedInForward == null || this . notLoggedInForward . length ( ) == 0 ) { throw new ServletException ( "Init parameter " + "'" + TransactionFilter . INIT_PARAM_URL_LOGIN_PAGE + "' not defined" ) ; } this . exludeUris . add ( ( root + this . notLoggedInForward ) . replaceAll ( "//+" , "/" ) ) ; this . exludeUris . add ( ( root + "/servlet/login" ) . replaceAll ( "//+" , "/" ) ) ; final ServiceLoader < ILoginProvider > serviceLoaderLogins = ServiceLoader . load ( ILoginProvider . class ) ; for ( final ILoginProvider loginProvider : serviceLoaderLogins ) { LOG . info ( "[TransactionFilter] registered: {}" , loginProvider ) ; this . loginProviders . add ( loginProvider ) ; }


signature:
public class TransactionFilter { /** * @ param _ request servlet request
 * @ param _ response servlet response
 * @ param _ chain filter chain
 * @ throws IOException on error
 * @ throws ServletException on error */
@ Override protected void doFilter ( final HttpServletRequest _request , final HttpServletResponse _response , final FilterChain _chain ) throws IOException , ServletException { } }

implementation: try { Locale locale = null ; locale = _request . getLocale ( ) ; final Map < String , String [ ] > params = new HashMap < > ( _request . getParameterMap ( ) ) ; Context . begin ( getLoggedInUser ( _request ) , locale , getContextSessionAttributes ( _request ) , params , null , Context . Inheritance . Inheritable ) ; } catch ( final EFapsException e ) { TransactionFilter . LOG . error ( "could not initialise the context" , e ) ; throw new ServletException ( e ) ; } try { boolean ok = false ; try { _chain . doFilter ( _request , _response ) ; ok = true ; } finally { if ( ok && Context . isTMActive ( ) ) { Context . commit ( ) ; } else { if ( Context . isTMMarkedRollback ( ) ) { TransactionFilter . LOG . error ( "transaction is marked to roll back" ) ; } else { TransactionFilter . LOG . error ( "transaction manager in undefined status" ) ; } Context . rollback ( ) ; } } } catch ( final EFapsException e ) { TransactionFilter . LOG . error ( "" , e ) ; throw new ServletException ( e ) ; }


signature:
public class ResourceType { /** * Returns a set containing all the known resource types , except those is the given set
 * @ param resourceTypes The resource types which will not be included in the returned set
 * @ return The complement of the given set of resource types */
public static Set < ResourceType > complementOf ( final Set < ResourceType > resourceTypes ) { } }

implementation: final Set < ResourceType > set = allOf ( ) ; set . removeAll ( resourceTypes ) ; return set ;


signature:
public class ResourceType { /** * Returns a set containing the given resource types
 * @ param first The first resource type to add
 * @ param rest The remaining resource types to add
 * @ return A set containing the given resource types */
public static Set < ResourceType > of ( final ResourceType first , final ResourceType ... rest ) { } }

implementation: final Set < ResourceType > set = new HashSet < > ( ) ; set . add ( first ) ; set . addAll ( Arrays . asList ( rest ) ) ; return set ;


signature:
public class HRefFactory { /** * { @ inheritDoc } */
@ Override public Component getReadOnly ( final String _wicketId , final AbstractUIField _uiField ) throws EFapsException { } }

implementation:
Component ret = null ; if ( applies ( _uiField ) ) { String icon = _uiField . getFieldConfiguration ( ) . getField ( ) . getIcon ( ) ; if ( icon == null && _uiField . getInstance ( ) != null && _uiField . getFieldConfiguration ( ) . getField ( ) . isShowTypeIcon ( ) && _uiField . getInstance ( ) . getType ( ) != null ) { final Image image = Image . getTypeIcon ( _uiField . getInstance ( ) . getType ( ) ) ; if ( image != null ) { icon = image . getName ( ) ; } } String content = null ; for ( final IComponentFactory factory : _uiField . getFactories ( ) . values ( ) ) { if ( factory instanceof AbstractUIFactory ) { final AbstractUIFactory uiFactory = ( AbstractUIFactory ) factory ; if ( uiFactory . applies ( _uiField ) ) { content = uiFactory . getReadOnlyValue ( _uiField ) ; break ; } } } if ( StringUtils . isEmpty ( content ) ) { if ( isCheckOut ( _uiField ) && icon != null ) { ret = new IconCheckOutLink ( _wicketId , Model . of ( _uiField ) , content , icon ) ; } else { ret = new LabelField ( _wicketId , Model . of ( "" ) , _uiField ) ; } } else if ( isCheckOut ( _uiField ) ) { if ( icon == null ) { ret = new CheckOutLink ( _wicketId , Model . of ( _uiField ) , content ) ; } else { ret = new IconCheckOutLink ( _wicketId , Model . of ( _uiField ) , content , icon ) ; } } else { // evaluate which kind of link must be done
IRequestablePage page = null ; IRequestablePage calledByPage = null ; if ( RequestCycle . get ( ) . getActiveRequestHandler ( ) instanceof IPageRequestHandler ) { page = ( ( IPageRequestHandler ) RequestCycle . get ( ) . getActiveRequestHandler ( ) ) . getPage ( ) ; if ( page != null && page instanceof AbstractContentPage ) { final PageReference pageRef = ( ( AbstractContentPage ) page ) . getCalledByPageReference ( ) ; if ( pageRef != null ) { calledByPage = pageRef . getPage ( ) ; } } } // first priority is the pagePosition than . .
boolean ajax = page != null && ( ( Component ) page ) . getDefaultModelObject ( ) instanceof IPageObject && PagePosition . TREE . equals ( ( ( IPageObject ) ( ( Component ) page ) . getDefaultModelObject ( ) ) . getPagePosition ( ) ) ; if ( ! ajax ) { ajax = _uiField . getParent ( ) != null && _uiField . getParent ( ) instanceof IPageObject && PagePosition . TREE . equals ( ( ( IPageObject ) _uiField . getParent ( ) ) . getPagePosition ( ) ) ; } if ( ! ajax ) { // ajax if the page or the reference is a ContentContainerPage ,
// or the table was called as part of a WizardCall meaning connect is done
// or it was opened after a form in modal mode
ajax = page != null && ( page instanceof ContentContainerPage || calledByPage instanceof ContentContainerPage ) || page instanceof TablePage && ( ( AbstractUIPageObject ) ( ( Component ) page ) . getDefaultModelObject ( ) ) . isPartOfWizardCall ( ) // form opened modal over a form
|| page instanceof FormPage && calledByPage instanceof FormPage && Target . MODAL . equals ( ( ( UIForm ) ( ( Component ) page ) . getDefaultModelObject ( ) ) . getTarget ( ) ) // form opened modal over a table that itself is part of a contentcontainer
|| page instanceof FormPage && Target . MODAL . equals ( ( ( UIForm ) ( ( Component ) page ) . getDefaultModelObject ( ) ) . getTarget ( ) ) && calledByPage instanceof TablePage && ( ( TablePage ) calledByPage ) . getCalledByPageReference ( ) != null && ! ( ( ( TablePage ) calledByPage ) . getCalledByPageReference ( ) . getPage ( ) instanceof MainPage ) ; } // verify ajax by checking if is not a recent link
if ( ajax && RequestCycle . get ( ) . getActiveRequestHandler ( ) instanceof IComponentRequestHandler ) { ajax = ajax && ! ( ( ( IComponentRequestHandler ) RequestCycle . get ( ) . getActiveRequestHandler ( ) ) . getComponent ( ) instanceof RecentLink ) ; } // check if for searchmode the page is in an pop up window
boolean isInPopUp = false ; if ( _uiField . getParent ( ) . isSearchMode ( ) ) { if ( ( ( IWizardElement ) _uiField . getParent ( ) ) . isWizardCall ( ) ) { final IWizardElement pageObj = ( ( IWizardElement ) _uiField . getParent ( ) ) . getUIWizardObject ( ) . getWizardElement ( ) . get ( 0 ) ; if ( pageObj instanceof IPageObject ) { isInPopUp = PagePosition . POPUP . equals ( ( ( IPageObject ) pageObj ) . getPagePosition ( ) ) ; } else { isInPopUp = Target . POPUP . equals ( ( ( ICmdUIObject ) pageObj ) . getCommand ( ) . getTarget ( ) ) ; } } } if ( icon == null ) { if ( ajax ) { // checking if is a link of a structurbrowser browserfield
if ( page instanceof StructurBrowserPage && ( ( UIStructurBrowser ) _uiField . getParent ( ) ) . isBrowserField ( _uiField ) ) { ret = new LoadInTargetAjaxLink ( _wicketId , Model . of ( _uiField ) , content , ScriptTarget . TOP ) ; } else { ret = new MenuContentLink ( _wicketId , Model . of ( _uiField ) , content ) ; } } else if ( isInPopUp ) { ret = new LoadInTargetAjaxLink ( _wicketId , Model . of ( _uiField ) , content , ScriptTarget . OPENER ) ; } else { ret = new ContentContainerLink ( _wicketId , Model . of ( _uiField ) , content ) ; } } else { if ( ajax ) { ret = new IconMenuContentLink ( _wicketId , Model . of ( _uiField ) , content , icon ) ; } else if ( isInPopUp ) { ret = new IconLoadInTargetAjaxLink ( _wicketId , Model . of ( _uiField ) , content , ScriptTarget . OPENER , icon ) ; } else { ret = new IconContentContainerLink ( _wicketId , Model . of ( _uiField ) , content , icon ) ; } } } } return ret ;


signature:
public class HRefFactory { /** * { @ inheritDoc } */
@ Override public Comparable < ? > getCompareValue ( final AbstractUIField _uiField ) throws EFapsException { } }

implementation: Comparable < ? > ret = null ; for ( final IComponentFactory factory : _uiField . getFactories ( ) . values ( ) ) { if ( factory instanceof AbstractUIFactory ) { final AbstractUIFactory uiFactory = ( AbstractUIFactory ) factory ; if ( uiFactory . applies ( _uiField ) ) { ret = uiFactory . getCompareValue ( _uiField ) ; break ; } } } return ret ;


signature:
public class HRefFactory { /** * { @ inheritDoc } */
@ Override public String getStringValue ( final AbstractUIField _uiField ) throws EFapsException { } }

implementation: String ret = "" ; for ( final IComponentFactory factory : _uiField . getFactories ( ) . values ( ) ) { if ( factory instanceof AbstractUIFactory ) { final AbstractUIFactory uiFactory = ( AbstractUIFactory ) factory ; if ( uiFactory . applies ( _uiField ) ) { ret = uiFactory . getStringValue ( _uiField ) ; break ; } } } return ret ;


signature:
public class HRefFactory { /** * { @ inheritDoc } */
@ Override public boolean applies ( final AbstractUIField _uiField ) throws EFapsException { } }

implementation: return ( _uiField . getParent ( ) . isViewMode ( ) || _uiField . getParent ( ) . isSearchMode ( ) ) && _uiField . getFieldConfiguration ( ) . getField ( ) . getReference ( ) != null && _uiField . getInstanceKey ( ) != null && ( isCheckOut ( _uiField ) || hasAccess2Menu ( _uiField ) ) ;


signature:
public class HRefFactory { /** * Checks if is a check out .
 * @ param _ uiField the _ ui field
 * @ return true , if is check out */
private boolean isCheckOut ( final AbstractUIField _uiField ) { } }

implementation: return StringUtils . containsIgnoreCase ( _uiField . getFieldConfiguration ( ) . getField ( ) . getReference ( ) , HRef . CHECKOUT . toString ( ) ) ;


signature:
public class HRefFactory { /** * Checks for access to menu .
 * @ param _ uiField the ui field
 * @ return true , if successful
 * @ throws EFapsException on error */
private boolean hasAccess2Menu ( final AbstractUIField _uiField ) throws EFapsException { } }

implementation: final Menu menu = Menu . getTypeTreeMenu ( _uiField . getInstance ( ) . getType ( ) ) ; return menu != null && menu . hasAccess ( _uiField . getParent ( ) . getMode ( ) , _uiField . getInstance ( ) ) && ( ! ( ( AbstractUIPageObject ) _uiField . getParent ( ) ) . getAccessMap ( ) . containsKey ( _uiField . getInstance ( ) ) || ( ( AbstractUIPageObject ) _uiField . getParent ( ) ) . getAccessMap ( ) . containsKey ( _uiField . getInstance ( ) ) && ( ( AbstractUIPageObject ) _uiField . getParent ( ) ) . getAccessMap ( ) . get ( _uiField . getInstance ( ) ) ) ;


signature:
public class BasicAuthenticationFilter { /** * If the user does not make authentication , the header for basic
 * authentication is sent to the client . After the client makes the
 * authentication , the name and password is checked with method
 * { @ link AbstractAuthenticationFilter # checkLogin } . < br / >
 * If the authentication fails , the header for basic authentication is sent
 * again to the used , otherwise the nothing is filtered anymore .
 * @ param _ request HttpServletRequest
 * @ param _ response HttpServletResponse
 * @ param _ chain FilterChain
 * @ throws IOException on error
 * @ throws ServletException on error */
@ Override protected void doAuthenticate ( final HttpServletRequest _request , final HttpServletResponse _response , final FilterChain _chain ) throws IOException , ServletException { } }

implementation: final String header = _request . getHeader ( "Authorization" ) ; if ( header == null ) { _response . setHeader ( "WWW-Authenticate" , "Basic realm=\"" + this . title + "\"" ) ; _response . sendError ( HttpServletResponse . SC_UNAUTHORIZED ) ; } else { final String encoded = header . substring ( header . indexOf ( " " ) + 1 ) ; final String decoded = new String ( Base64 . decodeBase64 ( encoded . getBytes ( ) ) , "UTF8" ) ; final String name = decoded . substring ( 0 , decoded . indexOf ( ":" ) ) ; final String passwd = decoded . substring ( decoded . indexOf ( ":" ) + 1 ) ; if ( checkLogin ( name , passwd ) ) { setLoggedInUser ( _request , name ) ; _chain . doFilter ( _request , _response ) ; } else { _response . setHeader ( "WWW-Authenticate" , "Basic realm=\"" + this . title + "\"" ) ; _response . sendError ( HttpServletResponse . SC_UNAUTHORIZED ) ; } }


signature:
public class UIMenuItem { /** * This method returns the URL to the Image of this MenuItem .
 * @ return URL of the Image
 * @ throws EFapsException on error */
public String getTypeImage ( ) throws EFapsException { } }

implementation: String ret = null ; if ( getInstance ( ) != null ) { final Image imageTmp = Image . getTypeIcon ( getInstance ( ) . getType ( ) ) ; if ( imageTmp != null ) { ret = imageTmp . getName ( ) ; } } return ret ;


signature:
public class UIMenuItem { /** * this method initializes this MenuItem .
 * @ throws CacheReloadException on error */
private void initialize ( ) throws CacheReloadException { } }

implementation: final AbstractCommand command = super . getCommand ( ) ; this . image = command . getIcon ( ) ; this . reference = command . getReference ( ) ; this . askUser = command . isAskUser ( ) ; this . windowHeight = command . getWindowHeight ( ) ; this . windowWidth = command . getWindowWidth ( ) ; this . defaultSelected = command . isDefaultSelected ( ) ; this . description = "" ; this . submitSelectedRows = command . getSubmitSelectedRows ( ) ; requeryLabel ( ) ; try { if ( command instanceof AbstractMenu ) { for ( final AbstractCommand subCmd : ( ( AbstractMenu ) command ) . getCommands ( ) ) { if ( subCmd != null && subCmd . hasAccess ( getMode ( ) , getInstance ( ) ) ) { if ( subCmd . getTargetMode ( ) . equals ( TargetMode . SEARCH ) ) { final UISearchItem child = new UISearchItem ( subCmd . getUUID ( ) , getInstanceKey ( ) ) ; child . setParent ( this ) ; this . children . add ( child ) ; } else { final UIMenuItem child = new UIMenuItem ( subCmd . getUUID ( ) , getInstanceKey ( ) ) ; child . setParent ( this ) ; this . children . add ( child ) ; try { if ( Context . getThreadContext ( ) . containsSessionAttribute ( child . getCacheKey ( ) ) ) { final Boolean expandTmp = ( Boolean ) Context . getThreadContext ( ) . getSessionAttribute ( child . getCacheKey ( ) ) ; child . setExpanded ( expandTmp ) ; } } catch ( final EFapsException e ) { UIMenuItem . LOG . error ( "Error retrieving Session info for UIMenuItem called by Command " + "with UUID: {}" , getCommandUUID ( ) , e ) ; } } } } } if ( Configuration . getAttributeAsBoolean ( ConfigAttribute . USER_MENUACT ) && UUID . fromString ( Configuration . getAttribute ( ConfigAttribute . USER_MENUMENU ) ) . equals ( getCommandUUID ( ) ) ) { for ( final String key : UsageRegistry . getKeyList ( ) ) { addChild4Key ( key ) ; } } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; }


signature:
public class UIMenuItem { /** * Requery the Label .
 * @ return true if the label was changed , else false */
public boolean requeryLabel ( ) { } }

implementation: boolean ret = false ; try { String labelTmp = DBProperties . getProperty ( getCommand ( ) . getLabel ( ) ) ; if ( getInstance ( ) != null ) { final ValueParser parser = new ValueParser ( new StringReader ( labelTmp ) ) ; final ValueList list = parser . ExpressionString ( ) ; if ( list . getExpressions ( ) . size ( ) > 0 ) { final PrintQuery print = new PrintQuery ( getInstance ( ) ) ; list . makeSelect ( print ) ; if ( print . execute ( ) ) { labelTmp = list . makeString ( getInstance ( ) , print , getMode ( ) ) ; } } } ret = ! labelTmp . equals ( this . label ) ; this . label = labelTmp ; } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final ParseException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } return ret ;


signature:
public class UIMenuItem { /** * Is the Childitem a child / grandchild of the Parentitem .
 * @ param _ childItem ChildItem
 * @ param _ parentItem ParentItem
 * @ return true if child or grandchild etc . */
public boolean isChild ( final UIMenuItem _childItem , final UIMenuItem _parentItem ) { } }

implementation: boolean ret = _parentItem . getChildren ( ) . contains ( _childItem ) ; if ( ! ret ) { for ( final UIMenuItem child : _parentItem . getChildren ( ) ) { if ( child . hasChildren ( ) ) { ret = isChild ( _childItem , child ) ; } if ( ret ) { break ; } } } return ret ;


signature:
public class UIMenuItem { /** * Store the Information in the Session . */
private void storeInSession ( ) { } }

implementation: try { Context . getThreadContext ( ) . setSessionAttribute ( getCacheKey ( ) , isExpanded ( ) ) ; } catch ( final EFapsException e ) { UIMenuItem . LOG . error ( "Error storing Session info for UIMenuItem called by Command with UUID: {}" , getCommandUUID ( ) , e ) ; }


signature:
public class HomeItem { /** * On click it is evaluated what must be responded . */
@ Override public void onClick ( ) { } }

implementation:
try { setResponsePage ( new DashboardPage ( getPage ( ) . getPageReference ( ) ) ) ; } catch ( final EFapsException e ) { // TODO Auto - generated catch block
e . printStackTrace ( ) ; }