signature:
public class FilePatternMatcher { /** * Determines if the given path matches the configured include and exclude
 * patterns .
 * NOTE : The include pattern is evaluated before the exclude pattern .
 * @ param path
 * The path .
 * @ return < code > true < / code > if the path matches . */
public boolean accepts ( String path ) { } }

implementation: boolean result ; if ( includeFilePatterns != null ) { result = matches ( path , includeFilePatterns ) ; } else { result = true ; } if ( excludeFilePatterns != null ) { result = result && ! matches ( path , excludeFilePatterns ) ; } return result ;


signature:
public class AnswerSet { /** * Adds an answer to a question to the AnswerSet .
 * @ param questionId the id of the question to be answered
 * @ param answerId the id of the answer selected */
public void addAnswer ( int questionId , int answerId ) { } }

implementation: QuestionAnswerPair answerPair = new QuestionAnswerPair ( questionId , answerId ) ; answers . add ( answerPair ) ;


signature:
public class WatchlistHit { /** * Gets a list of elements in your request that match this watchlist hit .
 * @ return an array of strings containing the matching info */
@ NotNull public String [ ] getMatchingInfo ( ) { } }

implementation: if ( matchingInfo == null ) { return new String [ 0 ] ; } return Arrays . copyOf ( matchingInfo , matchingInfo . length ) ;


signature:
public class WatchlistHit { /** * Gets the address of the candidate .
 * @ return the address */
@ Nullable public Address getAddress ( ) { } }

implementation: return new Address ( addressStreet1 , addressStreet2 , addressCity , addressState , addressPostalCode , addressCountryCode ) ;


signature:
public class Person { /** * Creates a question set with a set time limit in seconds .
 * @ param timeLimit the time limit
 * @ return the new question set */
public QuestionSet createQuestionSet ( long timeLimit ) { } }

implementation: Map < String , String > queryOptions = new HashMap < String , String > ( ) ; queryOptions . put ( "person_id" , getId ( ) ) ; queryOptions . put ( "time_limit" , String . valueOf ( timeLimit ) ) ; QuestionSet questionSet = restAdapter . createQuestionSet ( queryOptions ) ; questionSet . setAdapter ( restAdapter ) ; return questionSet ;


signature:
public class Person { /** * Retrieve a question set you have created .
 * @ param questionSetId Question set ID
 * @ return the retrieved question set */
public QuestionSet retrieveQuestionSet ( @ NotNull final String questionSetId ) { } }

implementation: QuestionSet questionSet = restAdapter . retrieveQuestionSet ( questionSetId ) ; questionSet . setAdapter ( restAdapter ) ; return questionSet ;


signature:
public class Person { /** * Gets the date of birth for this individual .
 * @ return the date of birth */
@ NotNull public Date getDateOfBirth ( ) { } }

implementation: GregorianCalendar calendar = new GregorianCalendar ( birthYear , birthMonth , birthDay ) ; return calendar . getTime ( ) ;


signature:
public class Person { /** * Gets the address for this individual .
 * @ return the address */
@ NotNull public Address getAddress ( ) { } }

implementation: Address addressObject = new Address ( addressStreet1 , addressStreet2 , addressCity , addressSubdivision , addressPostalCode , addressCountryCode ) ; return addressObject ;


signature:
public class Company { /** * Gets the date of incorporation .
 * @ return the incorporation date */
@ Nullable public Date getIncorporationDate ( ) { } }

implementation: if ( incorporationDay == null || incorporationMonth == null || incorporationYear == null ) { return null ; } GregorianCalendar calendarDay = new GregorianCalendar ( incorporationYear , incorporationMonth , incorporationDay ) ; return calendarDay . getTime ( ) ;


signature:
public class Candidate { /** * Returns a complete revision history of a candidate ' s edits . This allows you to maintain a full
 * audit trail of when and how you update a client ' s profile over time . The latest revision is
 * presented at the top of the list , and the original is at the end of the list .
 * @ return the list of candidates */
public List < Candidate > getRevisionHistory ( ) { } }

implementation: List < Candidate > candidates = restAdapter . getCandidateHistory ( getId ( ) ) ; for ( Candidate candidate : candidates ) { candidate . setAdapter ( restAdapter ) ; } return Collections . unmodifiableList ( candidates ) ;


signature:
public class Candidate { /** * Performs a watchlist search for this candidate .
 * @ param entityType the type of entity
 * @ param similarityThreshold the accepted threshold of similarity
 * @ return the paginated watchlist hit results */
public PaginatedResult < WatchlistHit > searchWatchlists ( EntityType entityType , Double similarityThreshold ) { } }

implementation:
Map < String , String > queryOptions = new HashMap < String , String > ( ) ; queryOptions . put ( "candidate_id" , getId ( ) ) ; if ( entityType != null ) { queryOptions . put ( "match_type" , String . valueOf ( entityType ) ) ; } if ( similarityThreshold != null ) { queryOptions . put ( "similarity_threshold" , String . valueOf ( similarityThreshold ) ) ; } WatchlistSearchResults results = restAdapter . searchWatchlists ( queryOptions ) ; // wrap the result ' s data with PaginatedResult to make v5.0 transition simpler
return new PaginatedResult < WatchlistHit > ( results . getMatches ( ) , results . getCount ( ) , false ) ;


signature:
public class Candidate { /** * Set the date of birth of your candidate .
 * @ param dateOfBirth the date of birth
 * @ return this */
@ NotNull public Candidate setDateOfBirth ( @ Nullable final Date dateOfBirth ) { } }

implementation: if ( dateOfBirth == null ) { this . dateOfBirth = null ; return this ; } this . dateOfBirth = new Date ( dateOfBirth . getTime ( ) ) ; return this ;


signature:
public class Candidate { /** * Sets the primary street address for this person .
 * @ param address the primary street address
 * @ return this */
public Candidate setAddress ( @ NotNull final Address address ) { } }

implementation: this . addressStreet1 = address . getStreet1 ( ) ; this . addressStreet2 = address . getStreet2 ( ) ; this . addressCity = address . getCity ( ) ; this . addressSubdivision = address . getSubdivision ( ) ; this . addressPostalCode = address . getPostalCode ( ) ; this . addressCountryCode = address . getCountryCode ( ) ; return this ;


signature:
public class BlockscoreApiClient { /** * Turns on / off logging . Must be set before creating API client to take effect .
 * @ param useVerboseLogs whether or not to use verbose network logs . */
public static void useVerboseLogs ( final boolean useVerboseLogs ) { } }

implementation: if ( useVerboseLogs ) { logLevel = RestAdapter . LogLevel . FULL ; } else { logLevel = RestAdapter . LogLevel . NONE ; }


signature:
public class BlockscoreApiClient { /** * Gets a single person exactly as it was when you created it .
 * This route is useful for auditing purposes as you can provide proof that a verification took place
 * along with all of its associated data .
 * @ param id ID of Person .
 * @ return the person , not null */
@ NotNull public Person retrievePerson ( @ NotNull final String id ) { } }

implementation: Person person = restAdapter . retrievePerson ( id ) ; person . setAdapter ( restAdapter ) ; return person ;


signature:
public class BlockscoreApiClient { /** * Lists a historical record of all verifications that you have completed .
 * The list is displayed in reverse chronological order ( newer people appear first ) .
 * @ return the historical listing of created people , not null */
@ NotNull public PaginatedResult < Person > listPeople ( ) { } }

implementation: PaginatedResult < Person > result = restAdapter . listPeople ( ) ; for ( Person person : result . getData ( ) ) { person . setAdapter ( restAdapter ) ; } return result ;


signature:
public class BlockscoreApiClient { /** * Retrieves a candidate .
 * @ param id ID of the candidate .
 * @ return the candidate , not null */
@ NotNull public Candidate retrieveCandidate ( @ NotNull final String id ) { } }

implementation: Candidate candidate = restAdapter . retrieveCandidate ( id ) ; candidate . setAdapter ( restAdapter ) ; return candidate ;


signature:
public class BlockscoreApiClient { /** * Lists a historical record of all candidates you have created .
 * The list is displayed in reverse chronological order ( newer candidates appear first ) .
 * @ return the historical listing of created candidates , not null */
@ NotNull public PaginatedResult < Candidate > listCandidates ( ) { } }

implementation: PaginatedResult < Candidate > result = restAdapter . listCandidates ( ) ; for ( Candidate candidate : result . getData ( ) ) { candidate . setAdapter ( restAdapter ) ; } return result ;


signature:
public class BlockscoreApiClient { /** * Encodes the API key for Basic authentication .
 * @ return the API key with Base 64 encoding */
@ NotNull private String getEncodedAuthorization ( ) { } }

implementation: try { return "Basic " + DatatypeConverter . printBase64Binary ( apiKey . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; }


signature:
public class BirthRange { /** * Returns the end of the date of birth range .
 * @ return the end of the date of birth range , may be null */
@ Nullable public Date getDateOfBirthEnd ( ) { } }

implementation: if ( birthDayEnd == null || birthMonthEnd == null || birthYearEnd == null ) { return null ; } GregorianCalendar calendar = new GregorianCalendar ( birthYearEnd , birthMonthEnd , birthDayEnd ) ; return calendar . getTime ( ) ;


signature:
public class AbstractScannerPlugin { /** * Determines the type parameter for a generic super class .
 * @ param expectedSuperClass
 * The generic super class .
 * @ param genericTypeParameterIndex
 * The index , e . g . 0 for the first .
 * @ return The type parameter . */
protected < T > Class < T > getTypeParameter ( Class < ? > expectedSuperClass , int genericTypeParameterIndex ) { } }

implementation: Class < ? extends AbstractScannerPlugin > thisClass = this . getClass ( ) ; if ( ! thisClass . getSuperclass ( ) . equals ( expectedSuperClass ) ) { throw new IllegalStateException ( "Cannot determine type argument of " + thisClass . getName ( ) ) ; } Type genericSuperclass = thisClass . getGenericSuperclass ( ) ; Type typeParameter = ( ( ParameterizedType ) genericSuperclass ) . getActualTypeArguments ( ) [ genericTypeParameterIndex ] ; if ( typeParameter instanceof ParameterizedType ) { return ( Class < T > ) ( ( ParameterizedType ) typeParameter ) . getRawType ( ) ; } return ( Class < T > ) typeParameter ;


signature:
public class AbstractScannerPlugin { /** * Get a property as string .
 * @ param name
 * The name .
 * @ param defaultValue
 * The default value .
 * @ return The value . */
protected String getStringProperty ( String name , String defaultValue ) { } }

implementation: Object value = properties . get ( name ) ; return value != null ? value . toString ( ) : defaultValue ;


signature:
public class AbstractScannerPlugin { /** * Get a property as boolean .
 * @ param name
 * The name .
 * @ param defaultValue
 * The default value .
 * @ return The value . */
protected Boolean getBooleanProperty ( String name , Boolean defaultValue ) { } }

implementation: Object value = properties . get ( name ) ; return value != null ? Boolean . valueOf ( value . toString ( ) ) : defaultValue ;


signature:
public class AbstractScannerPlugin { /** * Return the relative path of a file within a directory .
 * @ param directory
 * The directory .
 * @ param entry
 * The file .
 * @ return The relative path . */
protected String getDirectoryPath ( File directory , File entry ) { } }

implementation: String relativePath ; if ( entry . equals ( directory ) ) { relativePath = "/" ; } else { String filePath = entry . getAbsolutePath ( ) ; String directoryPath = directory . getAbsolutePath ( ) ; relativePath = filePath . substring ( directoryPath . length ( ) ) . replace ( File . separator , "/" ) ; } return relativePath ;


signature:
public class RequestError { /** * Gets the error type .
 * @ return the error type */
@ NotNull public BlockscoreErrorType getErrorType ( ) { } }

implementation: if ( type == null ) { return BlockscoreErrorType . UNKNOWN ; } else { return BlockscoreErrorType . toEnum ( type ) ; }


signature:
public class RequestError { /** * Gets the validation error type .
 * @ return the validation error type */
@ NotNull public ValidationErrorType getValidationErrorCode ( ) { } }

implementation: if ( code == null ) { return ValidationErrorType . UNKNOWN ; } else { return ValidationErrorType . toEnum ( code ) ; }


signature:
public class ContainerFileResolver { /** * Flush the caches to the store . */
public void flush ( ) { } }

implementation: createHierarchy ( ) ; sync ( fileContainerDescriptor . getRequires ( ) , requiredFiles ) ; sync ( fileContainerDescriptor . getContains ( ) , containedFiles ) ;


signature:
public class ContainerFileResolver { /** * Sync the given target collection with the new state from the cache map .
 * @ param target The target collection .
 * @ param after The new state to sync to . */
private void sync ( Collection < FileDescriptor > target , Map < String , FileDescriptor > after ) { } }

implementation: Map < String , FileDescriptor > before = getCache ( target ) ; Map < String , FileDescriptor > all = new HashMap < > ( ) ; all . putAll ( before ) ; all . putAll ( after ) ; for ( Map . Entry < String , FileDescriptor > entry : all . entrySet ( ) ) { String key = entry . getKey ( ) ; FileDescriptor fileDescriptor = entry . getValue ( ) ; boolean hasBefore = before . containsKey ( key ) ; boolean hasAfter = after . containsKey ( key ) ; if ( hasBefore && ! hasAfter ) { target . remove ( fileDescriptor ) ; } else if ( ! hasBefore && hasAfter ) { target . add ( fileDescriptor ) ; } }


signature:
public class ContainerFileResolver { /** * Creates cache map from the given collection of file descriptors .
 * @ param fileDescriptors The collection of file descriptors .
 * @ return The cache map . */
private Map < String , FileDescriptor > getCache ( Iterable < FileDescriptor > fileDescriptors ) { } }

implementation: Map < String , FileDescriptor > cache = new HashMap < > ( ) ; for ( FileDescriptor fileDescriptor : fileDescriptors ) { cache . put ( fileDescriptor . getFileName ( ) , fileDescriptor ) ; } return cache ;


signature:
public class ContainerFileResolver { /** * Build the hierarchy of the container entries , i . e . add contains relations
 * from containers to their children . */
private void createHierarchy ( ) { } }

implementation: for ( Map . Entry < String , FileDescriptor > entry : containedFiles . entrySet ( ) ) { String relativePath = entry . getKey ( ) ; FileDescriptor fileDescriptor = entry . getValue ( ) ; int separatorIndex = relativePath . lastIndexOf ( '/' ) ; if ( separatorIndex != - 1 ) { String parentName = relativePath . substring ( 0 , separatorIndex ) ; FileDescriptor parentDescriptor = containedFiles . get ( parentName ) ; if ( parentDescriptor instanceof FileContainerDescriptor ) { ( ( FileContainerDescriptor ) parentDescriptor ) . getContains ( ) . add ( fileDescriptor ) ; } } }


signature:
public class NetworkUtil { /** * Find an unused port . */
public static int findUnusedPort ( ) throws IOException { } }

implementation: int port ; try ( ServerSocket socket = new ServerSocket ( ) ) { socket . bind ( new InetSocketAddress ( 0 ) ) ; port = socket . getLocalPort ( ) ; } return port ;


signature:
public class EFapsRequestParametersAdapter { /** * Returns single value for parameter with specified name . This method always returns non - null
 * result even if the parameter does not exist .
 * @ param _ name parameter name
 * @ return { @ link StringValue } wrapping the actual value */
@ Override public StringValue getParameterValue ( final String _name ) { } }

implementation: final List < StringValue > values = this . parameters . get ( _name ) ; return ( values != null && ! values . isEmpty ( ) ) ? values . get ( 0 ) : StringValue . valueOf ( ( String ) null ) ;


signature:
public class EFapsRequestParametersAdapter { /** * Returns list of values for parameter with specified name . If the parameter does not exist
 * this method returns < code > null < / code >
 * @ param _ name parameter name
 * @ return list of all values for given parameter or < code > null < / code > if parameter does not
 * exist */
@ Override public List < StringValue > getParameterValues ( final String _name ) { } }

implementation: final List < StringValue > values = this . parameters . get ( _name ) ; return values != null ? Collections . unmodifiableList ( values ) : null ;


signature:
public class EFapsRequestParametersAdapter { /** * Sets the values for given parameter .
 * @ param _ name parameter name
 * @ param _ value values */
@ Override public void setParameterValues ( final String _name , final List < StringValue > _value ) { } }

implementation: this . parameters . put ( _name , _value ) ; try { Context . getThreadContext ( ) . getParameters ( ) . put ( _name , ParameterUtil . stringValues2Array ( _value ) ) ; } catch ( final EFapsException e ) { EFapsRequestParametersAdapter . LOG . error ( "Could not set parameter '{}' in Context." , _name ) ; }


signature:
public class EFapsRequestParametersAdapter { /** * Sets value for given key .
 * @ param _ key key for the value
 * @ param _ value value */
public void setParameterValue ( final String _key , final String _value ) { } }

implementation: final List < StringValue > list = new ArrayList < StringValue > ( 1 ) ; list . add ( StringValue . valueOf ( _value ) ) ; setParameterValues ( _key , list ) ;


signature:
public class EFapsRequestParametersAdapter { /** * Adds a value for given key .
 * @ param _ key key for the value
 * @ param _ value value */
public void addParameterValue ( final String _key , final String _value ) { } }

implementation: List < StringValue > list = this . parameters . get ( _key ) ; if ( list == null ) { list = new ArrayList < StringValue > ( 1 ) ; this . parameters . put ( _key , list ) ; } list . add ( StringValue . valueOf ( _value ) ) ; try { Context . getThreadContext ( ) . getParameters ( ) . put ( _key , ParameterUtil . stringValues2Array ( list ) ) ; } catch ( final EFapsException e ) { EFapsRequestParametersAdapter . LOG . error ( "Could not add parameter '{}' in Context." , _key ) ; }


signature:
public class AutoCompleteSettings { /** * Getter method for the instance variable { @ link # autoType } .
 * @ return value of instance variable { @ link # autoType } */
public AutoCompleteBehavior . Type getAutoType ( ) { } }

implementation: if ( this . autoType == null ) { if ( isRequired ( ) ) { setAutoType ( Type . COMPLETE ) ; } else { setAutoType ( Type . SUGGESTION ) ; } } return this . autoType ;


signature:
public class BitEnumUIFactory { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) @ Override public Component getEditable ( final String _wicketId , final AbstractUIField _abstractUIField ) throws EFapsException { } }

implementation: Component ret = null ; if ( applies ( _abstractUIField ) ) { ret = new CheckBoxField ( _wicketId , Model . of ( _abstractUIField ) , ( List < Object > ) _abstractUIField . getValue ( ) . getEditValue ( _abstractUIField . getParent ( ) . getMode ( ) ) , _abstractUIField . getFieldConfiguration ( ) ) ; } return ret ;


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

implementation: final StringBuilder bldr = new StringBuilder ( ) ; final Object valueTmp = _uiField . getValue ( ) . getReadOnlyValue ( _uiField . getParent ( ) . getMode ( ) ) ; if ( valueTmp instanceof List ) { boolean first = true ; for ( final Object obj : ( List < ? > ) valueTmp ) { if ( first ) { first = false ; } else { bldr . append ( ", " ) ; } bldr . append ( EnumUtil . getUILabel ( ( IEnum ) obj ) ) ; } } final String ret = bldr . toString ( ) ; return ret ;


signature:
public class AbstractUIPageObject { /** * Get the CommandAbstract that is the target of this Page .
 * @ return the calling CommandAbstract UIClassification
 * @ throws CacheReloadException the cache reload exception
 * @ see # targetCmdUUID */
public AbstractCommand getTargetCmd ( ) throws CacheReloadException { } }

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


signature:
public class AbstractUIPageObject { /** * Method to get the value for a key in case of wizard .
 * @ param _ key key for the value
 * @ return value for the object , if found , else null */
protected Object getValue4Wizard ( final String _key ) { } }

implementation: Object ret = null ; final Map < String , String [ ] > para = this . wizard . getParameters ( ( IWizardElement ) this ) ; if ( para != null && para . containsKey ( _key ) ) { final String [ ] value = para . get ( _key ) ; ret = value [ 0 ] ; } return ret ;


signature:
public class AbstractUIPageObject { /** * Used to check the access to e . g . TreeMenus .
 * @ param _ instances Instances that must be checked for access
 * @ return Map with Instance to Boolean
 * @ throws EFapsException on error */
protected Map < Instance , Boolean > checkAccessToInstances ( final List < Instance > _instances ) throws EFapsException { } }

implementation:
final Map < Type , List < Instance > > types = new HashMap < > ( ) ; for ( final Instance instance : _instances ) { final List < Instance > list ; if ( ! types . containsKey ( instance . getType ( ) ) ) { list = new ArrayList < > ( ) ; types . put ( instance . getType ( ) , list ) ; } else { list = types . get ( instance . getType ( ) ) ; } list . add ( instance ) ; } // check the access for the given instances
for ( final Entry < Type , List < Instance > > entry : types . entrySet ( ) ) { this . accessMap . putAll ( entry . getKey ( ) . checkAccess ( entry . getValue ( ) , AccessTypeEnums . SHOW . getAccessType ( ) ) ) ; } return this . accessMap ;


signature:
public class AbstractUIPageObject { /** * Register oid .
 * @ param _ oid the oid
 * @ return the string */
public String registerOID ( final String _oid ) { } }

implementation: final String ret = RandomUtil . randomAlphanumeric ( 8 ) ; getUiID2Oid ( ) . put ( ret , _oid ) ; return ret ;


signature:
public class StructurBrowserTreeTable { /** * Create a new component for a node .
 * @ param _ wicketId the component id
 * @ param _ model the model containing the node
 * @ return created component */
@ Override public Component newNodeComponent ( final String _wicketId , final IModel < UIStructurBrowser > _model ) { } }

implementation: return new Node < UIStructurBrowser > ( _wicketId , this , _model ) { private static final long serialVersionUID = 1L ; @ Override protected Component createContent ( final String _wicketId , final IModel < UIStructurBrowser > _model ) { return newContentComponent ( _wicketId , _model ) ; } @ Override protected MarkupContainer createJunctionComponent ( final String _id ) { final UIStructurBrowser strucBrws = ( UIStructurBrowser ) getDefaultModelObject ( ) ; final MarkupContainer ret ; if ( strucBrws . hasChildren ( ) && strucBrws . isForceExpanded ( ) ) { ret = new WebMarkupContainer ( _id ) ; } else { ret = super . createJunctionComponent ( _id ) ; } if ( strucBrws . getLevel ( ) > 0 ) { ret . add ( AttributeModifier . append ( "style" , "margin-left:" + 15 * ( strucBrws . getLevel ( ) - 1 ) + "px" ) ) ; } return ret ; } } ;


signature:
public class StructurBrowserTreeTable { /** * Create a new subtree .
 * @ param _ wicketId wicket id for this component
 * @ param _ model the model of the new subtree
 * @ return the created component */
@ Override public Component newSubtree ( final String _wicketId , final IModel < UIStructurBrowser > _model ) { } }

implementation: return new SubElement ( _wicketId , this , _model ) ;


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

implementation: final Set < IndexFlavor > set = allOf ( ) ; set . removeAll ( indexFlavors ) ; return set ;


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

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


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

implementation: Component ret = null ; if ( applies ( _uiField ) ) { final FieldConfiguration config = _uiField . getFieldConfiguration ( ) ; final UIType uiType = config . getUIType ( ) ; if ( uiType . equals ( UIType . CHECKBOX ) ) { ret = new CheckBoxField ( _wicketId , Model . of ( _uiField ) , null , config ) ; } else { final IModel < Map < Object , Object > > model = Model . ofMap ( ( Map < Object , Object > ) _uiField . getValue ( ) . getEditValue ( _uiField . getParent ( ) . getMode ( ) ) ) ; final Serializable value = _uiField . getValue ( ) . getDbValue ( ) ; ret = new BooleanField ( _wicketId , value , model , _uiField . getFieldConfiguration ( ) , _uiField . getLabel ( ) , _uiField instanceof UIFieldSetValue ) ; } } return ret ;


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

implementation: String strValue = "" ; if ( _uiField . getValue ( ) . getDbValue ( ) != null ) { final Map < Object , Object > map = ( Map < Object , Object > ) _uiField . getValue ( ) . getReadOnlyValue ( _uiField . getParent ( ) . getMode ( ) ) ; for ( final Entry < Object , Object > entry : map . entrySet ( ) ) { if ( entry . getValue ( ) . equals ( _uiField . getValue ( ) . getDbValue ( ) ) ) { strValue = ( String ) entry . getKey ( ) ; break ; } } } return strValue ;


signature:
public class MultiMap { /** * Add an entry for the given key - value pair to the map
 * @ param key The key
 * @ param value The value
 * @ return value */
@ Override public V put ( final K key , final V value ) { } }

implementation: entries . add ( new Entry ( key , value ) ) ; return value ;


signature:
public class MultiMap { /** * Remove all entries for the given key
 * @ param key The key
 * @ return Some value that was paired with the key . The exact value is indeterminate */
@ Override public V remove ( final Object key ) { } }

implementation: final Iterator < Map . Entry < K , V > > iterator = entries . iterator ( ) ; V lastValue = null ; while ( iterator . hasNext ( ) ) { final Map . Entry < K , V > entry = iterator . next ( ) ; lastValue = entry . getValue ( ) ; if ( key . equals ( entry . getKey ( ) ) ) { iterator . remove ( ) ; } } return lastValue ;


signature:
public class AbstractUI { /** * Gets the random for ID .
 * @ param _ id the id
 * @ return the random for ID */
public String getRandom4ID ( final Long _id ) { } }

implementation: final String rid = RandomUtil . randomAlphanumeric ( 8 ) ; this . random2id . put ( rid , _id ) ; return rid ;


signature:
public class AbstractUIHeaderObject { /** * This method retieves the UserAttribute for the ColumnWidths and evaluates
 * the string .
 * @ return List with the values of the columns in Pixel */
protected List < Integer > getUserWidths ( ) { } }

implementation:
List < Integer > ret = null ; try { if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . COLUMNWIDTH ) ) ) { setUserWidth ( true ) ; final String widths = Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . COLUMNWIDTH ) ) ; final StringTokenizer tokens = new StringTokenizer ( widths , ";" ) ; ret = new ArrayList < > ( ) ; while ( tokens . hasMoreTokens ( ) ) { final String token = tokens . nextToken ( ) ; for ( int i = 0 ; i < token . length ( ) ; i ++ ) { if ( ! Character . isDigit ( token . charAt ( i ) ) ) { final int width = Integer . parseInt ( token . substring ( 0 , i ) ) ; ret . add ( width ) ; break ; } } } } } catch ( final NumberFormatException e ) { // we don ' t throw an error because this are only Usersettings
AbstractUIHeaderObject . LOG . error ( "error during the retrieve of UserAttributes in getUserWidths()" , e ) ; } catch ( final EFapsException e ) { // we don ' t throw an error because this are only Usersettings
AbstractUIHeaderObject . LOG . error ( "error during the retrieve of UserAttributes in getUserWidths()" , e ) ; } return ret ;


signature:
public class AbstractUIHeaderObject { /** * Method to set he sort direction .
 * @ param _ sortdirection sort direction to set */
public void setSortDirection ( final SortDirection _sortdirection ) { } }

implementation:
this . sortDirection = _sortdirection ; try { Context . getThreadContext ( ) . setUserAttribute ( getCacheKey ( UserCacheKey . SORTDIRECTION ) , _sortdirection . getValue ( ) ) ; } catch ( final EFapsException e ) { // we don ' t throw an error because this are only Usersettings
AbstractUIHeaderObject . LOG . error ( "error during the retrieve of UserAttributes" , e ) ; }


signature:
public class AbstractUIHeaderObject { /** * Setter method for instance variable { @ link # sortKey } .
 * @ param _ sortKey value for instance variable { @ link # sortKey } */
public void setSortKey ( final String _sortKey ) { } }

implementation:
setSortKeyInternal ( _sortKey ) ; try { Context . getThreadContext ( ) . setUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTKEY ) , _sortKey ) ; } catch ( final EFapsException e ) { // we don ' t throw an error because this are only Usersettings
AbstractUIHeaderObject . LOG . error ( "error during the retrieve of UserAttributes" , e ) ; }


signature:
public class AbstractUIHeaderObject { /** * Method to set the order of the columns .
 * @ param _ markupsIds ids of the columns as a string with ; separated */
public void setColumnOrder ( final String _markupsIds ) { } }

implementation:
final StringTokenizer tokens = new StringTokenizer ( _markupsIds , ";" ) ; final StringBuilder columnOrder = new StringBuilder ( ) ; while ( tokens . hasMoreTokens ( ) ) { final String markupId = tokens . nextToken ( ) ; for ( final UITableHeader header : getHeaders ( ) ) { if ( markupId . equals ( header . getMarkupId ( ) ) ) { columnOrder . append ( header . getFieldName ( ) ) . append ( ";" ) ; break ; } } } try { Context . getThreadContext ( ) . setUserAttribute ( getCacheKey ( UITable . UserCacheKey . COLUMNORDER ) , columnOrder . toString ( ) ) ; } catch ( final EFapsException e ) { // we don ' t throw an error because this are only Usersettings
AbstractUIHeaderObject . LOG . error ( "error during the setting of UserAttributes" , e ) ; }


signature:
public class AbstractUIHeaderObject { /** * This method looks if for this TableModel a UserAttribute for the sorting
 * of the Columns exist . If they exist the Fields will be sorted as defined
 * by the User . If no definition of the User exist the Original default
 * sorting of the columns will be used . In the Case that the Definition of
 * the Table was altered Field which are not sorted yet will be sorted in at
 * the last position .
 * @ return List of fields */
protected List < Field > getUserSortedColumns ( ) { } }

implementation: List < Field > ret = new ArrayList < > ( ) ; try { final List < Field > fields = getTable ( ) . getFields ( ) ; if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . COLUMNORDER ) ) ) { final String columnOrder = Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . COLUMNORDER ) ) ; final StringTokenizer tokens = new StringTokenizer ( columnOrder , ";" ) ; while ( tokens . hasMoreTokens ( ) ) { final String fieldname = tokens . nextToken ( ) ; for ( int i = 0 ; i < fields . size ( ) ; i ++ ) { if ( fieldname . equals ( fields . get ( i ) . getName ( ) ) ) { ret . add ( fields . get ( i ) ) ; fields . remove ( i ) ; } } } if ( ! fields . isEmpty ( ) ) { for ( final Field field : fields ) { ret . add ( field ) ; } } } else { ret = fields ; } } catch ( final EFapsException e ) { AbstractUIHeaderObject . LOG . debug ( "Error on sorting columns" ) ; } return ret ;


signature:
public class SortHeaderColumnLink { /** * On the tag the class is set .
 * @ param _ tag tag to be set */
@ Override protected void onComponentTag ( final ComponentTag _tag ) { } }

implementation: super . onComponentTag ( _tag ) ; final UIStructurBrowser structurBrowser = ( UIStructurBrowser ) getDefaultModelObject ( ) ; if ( structurBrowser . getSortDirection ( ) . equals ( SortDirection . ASCENDING ) ) { _tag . put ( "class" , "sortLabelAsc" ) ; } else { _tag . put ( "class" , "sortLabelDsc" ) ; }


signature:
public class SortHeaderColumnLink { /** * The body of the component is filled with the header .
 * @ param _ markupStream MarkupStream
 * @ param _ openTag ComponentTag */
@ Override public void onComponentTagBody ( final MarkupStream _markupStream , final ComponentTag _openTag ) { } }

implementation: replaceComponentTagBody ( _markupStream , _openTag , this . header ) ;


signature:
public class SortHeaderColumnLink { /** * On click the model is sorted and a new page with this model as response
 * rendered . */
@ Override public void onClick ( ) { } }

implementation:
final UIStructurBrowser structurBrowser = ( UIStructurBrowser ) getDefaultModelObject ( ) ; // toggle sort direction
if ( structurBrowser . getSortDirection ( ) == SortDirection . NONE || structurBrowser . getSortDirection ( ) == SortDirection . DESCENDING ) { structurBrowser . setSortDirection ( SortDirection . ASCENDING ) ; } else { structurBrowser . setSortDirection ( SortDirection . DESCENDING ) ; } structurBrowser . sort ( ) ; try { final Page page ; if ( structurBrowser instanceof UIFieldStructurBrowser ) { page = new FormPage ( Model . of ( ( UIForm ) getPage ( ) . getDefaultModelObject ( ) ) ) ; } else { page = new StructurBrowserPage ( Model . of ( structurBrowser ) ) ; } getRequestCycle ( ) . setResponsePage ( page ) ; } catch ( final EFapsException e ) { getRequestCycle ( ) . setResponsePage ( new ErrorPage ( e ) ) ; }


signature:
public class ConfigFactory { /** * Returns a Config instance , instantiating it on first call . If no factory
 * implementation is provided , one will be searched using Service Loader If a
 * Config with given name already exists , it will be simply returned
 * @ param name
 * - the Config instance name
 * @ param factory
 * - a custom factory implementation
 * @ return the Config instance with given name , instanciating one if needed */
public static Config getConfig ( String name , IConfigFactory factory ) { } }

implementation:
if ( configs == null ) { init ( ) ; } if ( name == null ) { name = DEFAULT_CONFIG_NAME ; } Config got = configs . get ( name ) ; if ( got == null ) { log ( true , "No Config instance named " + name + "... requesting a new one" , null ) ; // recheck in synchronized block to avoid double instantiation
// will block concurrent calls to this Config until
// the initialization is complete
synchronized ( name . intern ( ) ) { got = configs . get ( name ) ; if ( got == null ) { got = factory == null ? load ( name ) : factory . createConfig ( name ) ; if ( got == null ) { log ( false , "Factory " + factory + " returned a null Config" , null ) ; throw new InvalidConfigException ( "Invalid Config returned by " + factory + " factory: null" ) ; } configs . put ( name , got ) ; } } } return got ;


signature:
public class UIRow { /** * Getter method for instance variable { @ link # hidden } .
 * @ return value of instance variable { @ link # hidden } */
public List < IHidden > getHidden ( ) { } }

implementation: for ( final IHidden hidden : this . hidden ) { hidden . setAdded ( false ) ; } return this . hidden ;


signature:
public class MessageListenerBehavior { /** * 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: super . renderHead ( _component , _response ) ; _response . render ( JavaScriptHeaderItem . forScript ( MessageListenerBehavior . getScript ( _component ) , _component . getClass ( ) . getName ( ) + "_MessageListener" ) ) ;


signature:
public class EFapsResourceAggregator { /** * Renders the given { @ link HeaderItem } to the response if none of the
 * { @ linkplain HeaderItem # getRenderTokens ( ) tokens } of the item has been rendered before .
 * @ param _ item The item to render . */
@ Override public void render ( final HeaderItem _item ) { } }

implementation: if ( _item instanceof OnDojoReadyHeaderItem ) { this . dojoReadyItems . add ( ( OnDojoReadyHeaderItem ) _item ) ; } else if ( _item instanceof AbstractEFapsHeaderItem ) { this . eFapsHeaderItems . add ( ( AbstractEFapsHeaderItem ) _item ) ; } else if ( _item instanceof AutoCompleteHeaderItem ) { this . autoCompleteItems . add ( ( AutoCompleteHeaderItem ) _item ) ; } else if ( _item instanceof RequireHeaderItem ) { this . requireHeaderItems . add ( ( RequireHeaderItem ) _item ) ; } else { super . render ( _item ) ; }


signature:
public class EFapsResourceAggregator { /** * render the eFaps Resource items . */
private void renderEFapsHeaderItems ( ) { } }

implementation: Collections . sort ( this . eFapsHeaderItems , ( _item0 , _item1 ) -> _item0 . getSortWeight ( ) . compareTo ( _item1 . getSortWeight ( ) ) ) ; final List < String > css = new ArrayList < > ( ) ; final List < String > js = new ArrayList < > ( ) ; for ( final AbstractEFapsHeaderItem item : this . eFapsHeaderItems ) { if ( item instanceof EFapsJavaScriptHeaderItem ) { js . add ( item . getReference ( ) . getName ( ) ) ; } else { css . add ( item . getReference ( ) . getName ( ) ) ; } } try { if ( ! css . isEmpty ( ) ) { final String key = BundleMaker . getBundleKey ( css , TempFileBundle . class ) ; final TempFileBundle bundle = ( TempFileBundle ) BundleMaker . getBundle ( key ) ; bundle . setContentType ( "text/css" ) ; super . render ( CssHeaderItem . forUrl ( EFapsApplication . get ( ) . getServletContext ( ) . getContextPath ( ) + "/servlet/static/" + key ) ) ; } if ( ! js . isEmpty ( ) ) { final String key = BundleMaker . getBundleKey ( js , TempFileBundle . class ) ; final TempFileBundle bundle = ( TempFileBundle ) BundleMaker . getBundle ( key ) ; bundle . setContentType ( "text/javascript" ) ; super . render ( JavaScriptHeaderItem . forUrl ( EFapsApplication . get ( ) . getServletContext ( ) . getContextPath ( ) + "/servlet/static/" + key ) ) ; } } catch ( final EFapsException e ) { EFapsResourceAggregator . LOG . error ( "Error on rendering eFaps Header items: " , e ) ; }


signature:
public class EFapsResourceAggregator { /** * Combines all DOM ready and onLoad scripts and renders them as 2 script
 * tags . */
private void renderCombinedEventScripts ( ) { } }

implementation: final StringBuilder combinedScript = new StringBuilder ( ) ; for ( final OnDojoReadyHeaderItem curItem : this . dojoReadyItems ) { combinedScript . append ( "\n" ) ; combinedScript . append ( curItem . getJavaScript ( ) ) ; combinedScript . append ( ";" ) ; } if ( combinedScript . length ( ) > 0 ) { super . render ( OnDojoReadyHeaderItem . forScript ( combinedScript . append ( "\n" ) . toString ( ) ) ) ; }


signature:
public class EFapsResourceAggregator { /** * Combines all DOM ready and onLoad scripts and renders them as 2 script
 * tags . */
private void renderCombinedAutoCompleteScripts ( ) { } }

implementation: final StringBuilder combinedScript = new StringBuilder ( ) ; final EnumSet < AutoCompleteBehavior . Type > types = EnumSet . noneOf ( AutoCompleteBehavior . Type . class ) ; for ( final AutoCompleteHeaderItem curItem : this . autoCompleteItems ) { for ( final AutoCompleteBehavior . Type type : curItem . getTypes ( ) ) { if ( ! types . contains ( type ) ) { types . add ( type ) ; } } combinedScript . append ( "\n" ) ; combinedScript . append ( curItem . getJavaScript ( ) ) ; combinedScript . append ( ";" ) ; } if ( combinedScript . length ( ) > 0 ) { if ( RequestCycle . get ( ) . getActiveRequestHandler ( ) instanceof AjaxRequestHandler ) { super . render ( new OnDomReadyHeaderItem ( AutoCompleteHeaderItem . writeJavaScript ( combinedScript . append ( "\n" ) , types , false ) ) ) ; } else { super . render ( AutoCompleteHeaderItem . forScript ( combinedScript . append ( "\n" ) . toString ( ) , types ) ) ; } }


signature:
public class MenuBarBehavior { /** * 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 ) ; _response . render ( RequireHeaderItem . forClasses ( DojoClasses . MenuBar , DojoClasses . parser ) ) ; _response . render ( OnDojoReadyHeaderItem . forScript ( DojoWrapper . require ( "  domStyle.set(\"" + _component . getMarkupId ( true ) + "\",\"visibility\",\"visible\");\n" + "  domStyle.set(\"" + _component . getMarkupId ( true ) + "\",\"position\",\"\");\n" + "  domStyle.set(\"" + _component . getMarkupId ( true ) + "\",\"left\",\"\");\n" , DojoClasses . domStyle ) ) ) ;


signature:
public class ClassificationFilter { /** * Gets the creates the tree node script .
 * @ return the creates the tree node script */
protected CharSequence getCreateTreeNodeScript ( ) { } }

implementation: final StringBuilder js = new StringBuilder ( ) ; js . append ( "function(args) {\n" ) . append ( "var tn = new dijit._TreeNode(args);\n" ) . append ( "tn.labelNode.innerHTML = args.label;\n" ) . append ( "var cb = new CheckBox({\n" ) . append ( "name: '" ) . append ( INPUTNAME ) . append ( "',\n" ) . append ( "value: args.item.id,\n" ) . append ( "checked: args.item.selected,\n" ) . append ( "onChange: function(b){\n" ) . append ( "this.focusNode.checked=this.checked;\n" ) . append ( "\n" ) . append ( "}\n" ) . append ( "});\n" ) . append ( "cb.placeAt(tn.labelNode, 'first');\n" ) . append ( "tn.cb = cb;\n" ) . append ( "return tn;\n" ) . append ( "}\n" ) ; return js ;


signature:
public class ClassificationFilter { /** * Gets the data .
 * @ return the data
 * @ throws EFapsException the e faps exception */
protected CharSequence getData ( ) throws EFapsException { } }

implementation: final StringBuilder js = new StringBuilder ( ) ; js . append ( "{ id: 'root', name: 'You cannot see this one.'}" ) ; final IClassificationFilter filter = ( IClassificationFilter ) getDefaultModelObject ( ) ; final Field field = Field . get ( filter . getFieldId ( ) ) ; final String [ ] names = field . getClassificationName ( ) . split ( ";" ) ; for ( final String className : names ) { final Classification clazz = Classification . get ( className ) ; js . append ( getDataLine ( clazz , filter ) ) ; } return js ;


signature:
public class ClassificationFilter { /** * Gets the data line .
 * @ param _ clazz the clazz
 * @ param _ filter the filter
 * @ return the data line
 * @ throws EFapsException the e faps exception */
protected CharSequence getDataLine ( final Classification _clazz , final IClassificationFilter _filter ) throws EFapsException { } }

implementation: final StringBuilder js = new StringBuilder ( ) ; if ( _clazz . hasAccess ( null , AccessTypeEnums . SHOW . getAccessType ( ) ) ) { js . append ( ",\n{id:'" ) . append ( _clazz . getUUID ( ) ) . append ( "', name:'" ) . append ( StringEscapeUtils . escapeEcmaScript ( _clazz . getLabel ( ) ) ) . append ( "', parent:'" ) . append ( _clazz . isRoot ( ) ? "root" : _clazz . getParentClassification ( ) . getUUID ( ) ) . append ( "', selected:" ) . append ( _filter . contains ( _clazz . getUUID ( ) ) ) . append ( "}" ) ; for ( final Classification childClazz : _clazz . getChildClassifications ( ) ) { js . append ( getDataLine ( childClazz , _filter ) ) ; } } return js ;


signature:
public class UIClassification { /** * Execute the model .
 * @ param _ instance Instance
 * @ throws EFapsException on error */
public void execute ( final Instance _instance ) throws EFapsException { } }

implementation: UIClassification clazz = this ; while ( ! clazz . isRoot ( ) ) { clazz = clazz . getParent ( ) ; } clazz . initialized = true ; for ( final UIClassification child : clazz . getChildren ( ) ) { final Classification type = ( Classification ) Type . get ( child . getClassificationUUID ( ) ) ; if ( clazz . selectedUUID . contains ( child . getClassificationUUID ( ) ) ) { child . setSelected ( true ) ; } child . addChildren ( child , type . getChildClassifications ( ) , clazz . selectedUUID , _instance ) ; clazz . expand ( ) ; }


signature:
public class UIClassification { /** * Expand the Tree . */
@ SuppressWarnings ( "unchecked" ) private void expand ( ) { } }

implementation: try { final String key = getCacheKey ( ) ; if ( Context . getThreadContext ( ) . containsSessionAttribute ( key ) ) { final Set < UUID > sessMap = ( Set < UUID > ) Context . getThreadContext ( ) . getSessionAttribute ( key ) ; setExpandedInternal ( sessMap . contains ( this . classificationUUID ) ) ; for ( final UIClassification uiClazz : getDescendants ( ) ) { if ( sessMap . contains ( uiClazz . classificationUUID ) ) { uiClazz . setExpandedInternal ( true ) ; } } } } catch ( final EFapsException e ) { UIClassification . LOG . error ( "Error reading Session info for UICLassificagtion called by Filed with ID: {}" , this . fieldId , e ) ; }


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

implementation: try { final Set < UUID > sessMap ; final String key = getCacheKey ( ) ; if ( Context . getThreadContext ( ) . containsSessionAttribute ( key ) ) { sessMap = ( Set < UUID > ) Context . getThreadContext ( ) . getSessionAttribute ( key ) ; } else { sessMap = new HashSet < UUID > ( ) ; } if ( this . expanded ) { sessMap . add ( this . classificationUUID ) ; } else if ( sessMap . contains ( this . classificationUUID ) ) { sessMap . remove ( this . classificationUUID ) ; } Context . getThreadContext ( ) . setSessionAttribute ( key , sessMap ) ; } catch ( final EFapsException e ) { UIClassification . LOG . error ( "Error storing Session info for UICLassificagtion called by Filed with ID: {}" , this . fieldId , e ) ; }


signature:
public class UIClassification { /** * Recursive method used to add the children to this UIClassification .
 * @ param _ parent parent
 * @ param _ children children
 * @ param _ selectedUUID set of selected classification uuids
 * @ param _ instance instance the classifcation belongs to
 * @ throws EFapsException on error */
private void addChildren ( final UIClassification _parent , final Set < Classification > _children , final Set < UUID > _selectedUUID , final Instance _instance ) throws EFapsException { } }

implementation: for ( final Classification child : _children ) { boolean access ; if ( ! child . isAbstract ( ) ) { final Instance inst = AbstractInstanceObject . getInstance4Create ( child ) ; access = child . hasAccess ( inst , getMode ( ) == TargetMode . CREATE || getMode ( ) == TargetMode . EDIT ? AccessTypeEnums . CREATE . getAccessType ( ) : AccessTypeEnums . SHOW . getAccessType ( ) ) ; } else { access = true ; } if ( access ) { final UIClassification childUI = new UIClassification ( child . getUUID ( ) , _parent . mode , false ) ; if ( _selectedUUID . contains ( child . getUUID ( ) ) ) { childUI . selected = true ; } childUI . addChildren ( childUI , child . getChildClassifications ( ) , _selectedUUID , _instance ) ; _parent . children . add ( childUI ) ; childUI . setParent ( _parent ) ; } } Collections . sort ( _parent . children , new Comparator < UIClassification > ( ) { @ Override public int compare ( final UIClassification _class0 , final UIClassification _class2 ) { return _class0 . getLabel ( ) . compareTo ( _class2 . getLabel ( ) ) ; } } ) ;


signature:
public class UIClassification { /** * Method to get the key to the instances related to this classification .
 * @ param _ instance Instance the related instance key are searched for
 * @ return Map of instance keys
 * @ throws EFapsException on error */
public Map < UUID , String > getClassInstanceKeys ( final Instance _instance ) throws EFapsException { } }

implementation:
final Map < UUID , String > ret = new HashMap < UUID , String > ( ) ; UIClassification clazz = this ; while ( ! clazz . isRoot ( ) ) { clazz = clazz . getParent ( ) ; } Type reltype = null ; for ( final UIClassification child : clazz . getChildren ( ) ) { final Classification classType = ( Classification ) Type . get ( child . getClassificationUUID ( ) ) ; if ( ! classType . getClassifyRelationType ( ) . equals ( reltype ) ) { final QueryBuilder queryBldr = new QueryBuilder ( classType . getClassifyRelationType ( ) ) ; queryBldr . addWhereAttrEqValue ( classType . getRelLinkAttributeName ( ) , _instance . getId ( ) ) ; final MultiPrintQuery multi = queryBldr . getPrint ( ) ; multi . addAttribute ( classType . getRelTypeAttributeName ( ) ) ; multi . execute ( ) ; while ( multi . next ( ) ) { final Long typeid = multi . < Long > getAttribute ( classType . getRelTypeAttributeName ( ) ) ; final Classification subClassType = ( Classification ) Type . get ( typeid ) ; final QueryBuilder subQueryBldr = new QueryBuilder ( subClassType ) ; subQueryBldr . addWhereAttrEqValue ( subClassType . getLinkAttributeName ( ) , _instance . getId ( ) ) ; subQueryBldr . addOrderByAttributeAsc ( "ID" ) ; final InstanceQuery query = subQueryBldr . getQuery ( ) ; query . execute ( ) ; if ( query . next ( ) ) { // TODO must return an instanceKey ! ! ! not necessary the
// oid
final String instanceKey = query . getCurrentValue ( ) . getOid ( ) ; ret . put ( query . getCurrentValue ( ) . getType ( ) . getUUID ( ) , instanceKey ) ; this . selectedUUID . add ( query . getCurrentValue ( ) . getType ( ) . getUUID ( ) ) ; } } } reltype = classType . getClassifyRelationType ( ) ; } return ret ;


signature:
public class UIClassification { /** * This method generates the Key for a UserAttribute by using the UUID of
 * the Command and the given static part , so that for every StruturBrowser a
 * unique key for expand etc , is created .
 * @ return String with the key */
public String getCacheKey ( ) { } }

implementation: String ret = "noKey" ; UIClassification clazz = this ; while ( ! clazz . isRoot ( ) ) { clazz = clazz . getParent ( ) ; } final Field field = Field . get ( clazz . getFieldId ( ) ) ; if ( field != null ) { try { ret = field . getCollection ( ) . getUUID ( ) . toString ( ) + "-" + field . getName ( ) + "-" + UIClassification . USERSESSIONKEY ; } catch ( final CacheReloadException e ) { UIClassification . LOG . error ( "Cannot generate CacheKey" , e ) ; } } return ret ;


signature:
public class BorderContainerBehavior { /** * The tag of the related component must be set , so that a dojo
 * BorderContainer will be rendered .
 * @ param _ component component this Behavior belongs to
 * @ param _ tag Tag to write to */
@ Override public void onComponentTag ( final Component _component , final ComponentTag _tag ) { } }

implementation: super . onComponentTag ( _component , _tag ) ; _tag . put ( "data-dojo-type" , "dijit/layout/BorderContainer" ) ; _tag . append ( "data-dojo-props" , "design: '" + this . design . key + "'" , "," ) ; _tag . append ( "class" , "tundra eFapsBorderContainer" , " " ) ;


signature:
public class BorderContainerBehavior { /** * 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 ) ; if ( this . toggleSplitter ) { _response . render ( RequireHeaderItem . forClasses ( DojoClasses . ToggleSplitter ) ) ; _response . render ( CssHeaderItem . forReference ( BorderContainerBehavior . CSS_SPLITTER ) ) ; } _response . render ( RequireHeaderItem . forClasses ( DojoClasses . BorderContainer , DojoClasses . parser ) ) ;


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

implementation: Component ret = null ; if ( applies ( _abstractUIField ) ) { ret = new DatePanel ( _wicketId , Model . of ( _abstractUIField ) , _abstractUIField . getFieldConfiguration ( ) , _abstractUIField . getValue ( ) . getEditValue ( _abstractUIField . getParent ( ) . getMode ( ) ) ) ; } return ret ;


signature:
public class DateUIFactory { /** * { @ 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 DateTime ) { final DateTime datetime = ( DateTime ) valueTmp ; final DateTime dateTmp = datetime . withChronology ( Context . getThreadContext ( ) . getChronology ( ) ) . withTimeAtStartOfDay ( ) ; strValue = dateTmp . toString ( DateUtil . getDateFormatter ( ) ) ; } return strValue ;


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

implementation: Comparable < ? > ret = ( Comparable < ? > ) _uiField . getValue ( ) . getReadOnlyValue ( _uiField . getParent ( ) . getMode ( ) ) ; if ( ret instanceof String && StringUtils . isEmpty ( ( String ) ret ) ) { ret = null ; } return ret ;


signature:
public class ViewDocumentRequestBuilder { /** * Adds values to the highlight _ expression parameter
 * @ param highlightExpression The first highlight expression
 * @ param highlightExpressions The remaining highlight expressions
 * @ return this */
public ViewDocumentRequestBuilder addHighlightExpressions ( final String highlightExpression , final String ... highlightExpressions ) { } }

implementation: this . highlightExpressions . add ( highlightExpression ) ; this . highlightExpressions . addAll ( Arrays . asList ( highlightExpressions ) ) ; return this ;


signature:
public class ViewDocumentRequestBuilder { /** * Adds values to the start _ tag parameter
 * @ param startTag The first start tag
 * @ param startTags The remaining start tags
 * @ return this */
public ViewDocumentRequestBuilder addStartTags ( final String startTag , final String ... startTags ) { } }

implementation: this . startTags . add ( startTag ) ; this . startTags . addAll ( Arrays . asList ( startTags ) ) ; return this ;


signature:
public class ViewDocumentRequestBuilder { /** * Adds values to the end _ tag parameter
 * @ param endTag The first end tag
 * @ param endTags The remaining end tags
 * @ return this */
public ViewDocumentRequestBuilder addEndTags ( final String endTag , final String ... endTags ) { } }

implementation: this . endTags . add ( endTag ) ; this . endTags . addAll ( Arrays . asList ( endTags ) ) ; return this ;


signature:
public class EditorBehavior { /** * The tag of the related component must be set , so that a dojo
 * BorderContainer will be rendered .
 * @ param _ component component this Behavior belongs to
 * @ param _ tag Tag to write to */
@ Override public void onComponentTag ( final Component _component , final ComponentTag _tag ) { } }

implementation: super . onComponentTag ( _component , _tag ) ; _tag . put ( "dojoType" , "dijit.Editor" ) ; if ( this . cmds . size ( ) > 0 ) { final StringBuilder str = new StringBuilder ( ) ; str . append ( "[" ) ; boolean first = true ; for ( final MenuCommands cmd : this . cmds ) { if ( first ) { first = false ; } else { str . append ( "," ) ; } str . append ( "'" ) . append ( cmd . key ) . append ( "'" ) ; } str . append ( "]" ) ; _tag . put ( "plugins" , str . toString ( ) ) ; }


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

implementation: Component ret = null ; if ( applies ( _uiField ) ) { ret = new RadioField ( _wicketId , Model . of ( _uiField ) , _uiField . getValue ( ) . getEditValue ( _uiField . getParent ( ) . getMode ( ) ) , _uiField . getFieldConfiguration ( ) , _uiField instanceof UIFieldSetValue ) ; } return ret ;


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

implementation: final Object valueTmp = _uiField . getValue ( ) . getReadOnlyValue ( _uiField . getParent ( ) . getMode ( ) ) ; final String ret = valueTmp == null ? null : EnumUtil . getUILabel ( ( IEnum ) valueTmp ) ; return ret ;


signature:
public class DashboardPanel { /** * Gets the loading component .
 * @ param _ markupId the markup id
 * @ return The component to show while the real component is being created . */
public Component getLoadingComponent ( final String _markupId ) { } }

implementation: final IRequestHandler handler = new ResourceReferenceRequestHandler ( AbstractDefaultAjaxBehavior . INDICATOR ) ; return new Label ( _markupId , "<img alt=\"Loading...\" src=\"" + RequestCycle . get ( ) . urlFor ( handler ) + "\"/>" ) . setEscapeModelStrings ( false ) ;


signature:
public class UpdateParentCallback { /** * Method is executed on close of the modal window .
 * @ param _ target Target */
@ Override public void onClose ( final AjaxRequestTarget _target ) { } }

implementation: if ( this . modalwindow . isUpdateParent ( ) ) { final Object object = this . pageReference . getPage ( ) . getDefaultModelObject ( ) ; try { if ( object instanceof AbstractUIObject ) { final AbstractUIObject uiObject = ( AbstractUIObject ) object ; if ( this . clearmodel ) { uiObject . resetModel ( ) ; } AbstractContentPage page = null ; if ( uiObject instanceof UITable ) { page = new TablePage ( Model . of ( ( UITable ) uiObject ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getModalWindow ( ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getCalledByPageReference ( ) ) ; } else if ( uiObject instanceof UIForm ) { page = new FormPage ( Model . of ( ( UIForm ) uiObject ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getModalWindow ( ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getCalledByPageReference ( ) ) ; } else if ( uiObject instanceof UIStructurBrowser ) { page = new StructurBrowserPage ( Model . of ( ( UIStructurBrowser ) uiObject ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getModalWindow ( ) , ( ( AbstractContentPage ) this . pageReference . getPage ( ) ) . getCalledByPageReference ( ) ) ; } RequestCycle . get ( ) . setResponsePage ( page ) ; } else if ( object instanceof UIGrid ) { final UIGrid uiGrid = ( UIGrid ) object ; uiGrid . reload ( ) ; RequestCycle . get ( ) . setResponsePage ( new GridPage ( Model . of ( uiGrid ) ) ) ; } } catch ( final EFapsException e ) { RequestCycle . get ( ) . setResponsePage ( new ErrorPage ( e ) ) ; } }


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

implementation: try { setResponsePage ( new ConnectionPage ( getPage ( ) . getPageReference ( ) ) ) ; } catch ( final EFapsException e ) { ConnectionItem . LOG . error ( "" , e ) ; }


signature:
public class UIWizardObject { /** * Insert a UIObject before the current one .
 * @ param _ element Object to insert */
public void insertBefore ( final IWizardElement _element ) { } }

implementation: int i = 0 ; for ( final IWizardElement uiObject : this . elements ) { if ( uiObject == this . current ) { this . elements . add ( i , _element ) ; break ; } i ++ ; }


signature:
public class UIWizardObject { /** * Method to get the previous object .
 * @ return previous object */
public IWizardElement getPrevious ( ) { } }

implementation: IWizardElement ret = null ; for ( final IWizardElement uiObject : this . elements ) { if ( uiObject == this . current ) { break ; } else { ret = uiObject ; } } this . current = ret ; return ret ;


signature:
public class UIWizardObject { /** * Add parameters .
 * @ param _ element object used as key
 * @ param _ parameters parameters */
public void addParameters ( final IWizardElement _element , final Map < String , String [ ] > _parameters ) { } }

implementation: this . parameters . put ( _element , _parameters ) ;


signature:
public class UIForm { /** * Method is used to execute the UIForm . ( Fill it with data ) . */
@ Override public void execute ( ) { } }

implementation:
try { // evaluate now to give the chance to change the mode
if ( evaluate4Instance ( ) ) { if ( isCreateMode ( ) || isSearchMode ( ) ) { execute4NoInstance ( ) ; } else { if ( getInstance ( ) == null ) { execute4NoInstance ( ) ; } else { execute4Instance ( ) ; } } } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } super . setInitialized ( true ) ;


signature:
public class UIForm { /** * This is a possibility to replace the current Instance for the form with
 * another one using an table evaluate esjp .
 * @ return true , if successful
 * @ throws EFapsException on error */
protected boolean evaluate4Instance ( ) throws EFapsException { } }

implementation: boolean ret = true ; if ( ! isSearchMode ( ) ) { final List < Return > returns = this . getCommand ( ) . executeEvents ( EventType . UI_TABLE_EVALUATE , ParameterValues . INSTANCE , getInstance ( ) , ParameterValues . PARAMETERS , Context . getThreadContext ( ) . getParameters ( ) , ParameterValues . CLASS , this ) ; for ( final Return retu : returns ) { if ( retu . contains ( ReturnValues . INSTANCE ) ) { final Object object = retu . get ( ReturnValues . INSTANCE ) ; if ( object != null && object instanceof Instance && ( ( Instance ) object ) . isValid ( ) ) { setInstanceKey ( ( ( Instance ) object ) . getOid ( ) ) ; } else { UIForm . LOG . error ( "The esjp called by Command '{}' must return a valid instance" , this . getCommand ( ) . getName ( ) ) ; } } else { ret = false ; } } } return ret ;


signature:
public class UIForm { /** * Method to execute the form in case that a instance is existing .
 * @ throws EFapsException
 * @ throws EFapsException on error */
private void execute4Instance ( ) throws EFapsException { } }

implementation:
final Set < String > altOIDSel = new HashSet < > ( ) ; final Form form = getForm ( ) ; // evaluate the Form to make the query
final PrintQuery print = new PrintQuery ( getInstance ( ) ) ; for ( final Field field : form . getFields ( ) ) { if ( field . hasAccess ( getMode ( ) , getInstance ( ) , this . getCommand ( ) , getInstance ( ) ) && ! field . isNoneDisplay ( getMode ( ) ) ) { if ( field . getSelect ( ) != null ) { print . addSelect ( field . getSelect ( ) ) ; } else if ( field . getAttribute ( ) != null ) { print . addAttribute ( field . getAttribute ( ) ) ; } else if ( field . getPhrase ( ) != null ) { print . addPhrase ( field . getName ( ) , field . getPhrase ( ) ) ; } else if ( field . getMsgPhrase ( ) != null ) { print . addMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( field ) ) , field . getMsgPhrase ( ) ) ; } if ( field . getSelectAlternateOID ( ) != null ) { print . addSelect ( field . getSelectAlternateOID ( ) ) ; altOIDSel . add ( field . getSelectAlternateOID ( ) ) ; } } } if ( print . execute ( ) ) { if ( ! altOIDSel . isEmpty ( ) ) { final List < Instance > inst = new ArrayList < > ( ) ; for ( final String sel : altOIDSel ) { inst . addAll ( print . getInstances4Select ( sel ) ) ; } checkAccessToInstances ( inst ) ; } FormElement currentFormElement = null ; boolean addNew = true ; UIClassification uiclass = null ; boolean firstTable = true ; for ( final Field field : form . getFields ( ) ) { final Instance instance = evaluateFieldInstance ( print , field ) ; if ( field . hasAccess ( getMode ( ) , instance , this . getCommand ( ) , getInstance ( ) ) && ! field . isNoneDisplay ( getMode ( ) ) ) { if ( field instanceof FieldGroup ) { final FieldGroup group = ( FieldGroup ) field ; // in case that the first field is a group the element
// must be initiated
if ( currentFormElement == null ) { currentFormElement = new FormElement ( ) ; this . elements . add ( new Element ( UIForm . ElementType . FORM , currentFormElement ) ) ; addNew = false ; } currentFormElement . setGroupCount ( group . getGroupCount ( ) ) ; } else if ( field instanceof FieldTable ) { if ( ( ( FieldTable ) field ) . getTargetStructurBrowserField ( ) == null ) { if ( isViewMode ( ) && "GridX" . equals ( Configuration . getAttribute ( ConfigAttribute . TABLE_DEFAULTTYPEFORM ) ) ) { final UIFieldGrid grid = UIFieldGrid . get ( getCommandUUID ( ) , getPagePosition ( ) , getInstance ( ) , ( FieldTable ) field ) ; this . elements . add ( new Element ( UIForm . ElementType . GRID , grid ) ) ; } else { final UIFieldTable uiFieldTable = new UIFieldTable ( getCommandUUID ( ) , getInstanceKey ( ) , ( FieldTable ) field ) ; uiFieldTable . setPagePosition ( getPagePosition ( ) ) ; uiFieldTable . setMode ( getMode ( ) ) ; this . elements . add ( new Element ( UIForm . ElementType . TABLE , uiFieldTable ) ) ; if ( firstTable ) { firstTable = false ; } else { uiFieldTable . setFirstTable ( false ) ; } } } else { if ( isViewMode ( ) && "GridX" . equals ( Configuration . getAttribute ( ConfigAttribute . STRUCBRWSR_DEFAULTTYPEFORM ) ) ) { final UIFieldGrid grid = UIFieldGrid . get ( getCommandUUID ( ) , getPagePosition ( ) , getInstance ( ) , ( FieldTable ) field ) ; this . elements . add ( new Element ( UIForm . ElementType . GRID , grid ) ) ; } else { final UIFieldStructurBrowser uiFieldStrucBrws = new UIFieldStructurBrowser ( getCommandUUID ( ) , getInstanceKey ( ) , ( FieldTable ) field ) ; uiFieldStrucBrws . setMode ( getMode ( ) ) ; this . elements . add ( new Element ( UIForm . ElementType . STRUCBRWS , uiFieldStrucBrws ) ) ; } } addNew = true ; } else if ( field instanceof FieldHeading ) { this . elements . add ( new Element ( UIForm . ElementType . HEADING , new UIHeading ( ( FieldHeading ) field ) ) ) ; addNew = true ; } else if ( field instanceof FieldClassification ) { uiclass = UIClassification . getUIClassification ( field , this ) ; this . elements . add ( new Element ( UIForm . ElementType . CLASSIFICATION , uiclass ) ) ; addNew = true ; this . classified = true ; } else { if ( addNew ) { final FormElement formElement = new FormElement ( ) . setGroupCount ( currentFormElement == null ? 0 : currentFormElement . getGroupCount ( ) ) ; currentFormElement = formElement ; this . elements . add ( new Element ( UIForm . ElementType . FORM , currentFormElement ) ) ; addNew = false ; } addCell2FormRow ( currentFormElement , print , field ) ; } } } if ( uiclass != null ) { final Map < UUID , String > instanceKeys = uiclass . getClassInstanceKeys ( getInstance ( ) ) ; if ( instanceKeys . size ( ) > 0 ) { if ( ! uiclass . isInitialized ( ) ) { uiclass . execute ( getInstance ( ) ) ; } addClassElements ( uiclass , instanceKeys ) ; } } }


signature:
public class UIForm { /** * Method that adds the classification forms as elements to the form by
 * walking down the tree .
 * @ param _ uiclass the classification to be added
 * @ param _ instanceKeys map from uuid to instance keys
 * @ throws EFapsException on error */
public void addClassElements ( final UIClassification _uiclass , final Map < UUID , String > _instanceKeys ) throws EFapsException { } }

implementation: this . elements . addAll ( getClassElements ( _uiclass , _instanceKeys ) ) ;


signature:
public class UIForm { /** * Method that removes all classifcations and afterwards adds the
 * classification forms as elements to the form by walking down the tree .
 * @ param _ uiclass the classification to be added
 * @ throws EFapsException on error */
public void updateClassElements ( final UIClassification _uiclass ) throws EFapsException { } }

implementation:
// remove previous added classification forms
final Iterator < Element > iter2 = this . elements . iterator ( ) ; final Map < UUID , String > uuid2InstanceKey = new HashMap < > ( ) ; while ( iter2 . hasNext ( ) ) { final IFormElement element = iter2 . next ( ) . getElement ( ) ; if ( element instanceof UIFieldForm ) { final String instanceKey = ( ( UIFieldForm ) element ) . getInstanceKey ( ) ; final TargetMode mode = ( ( UIFieldForm ) element ) . getMode ( ) ; if ( instanceKey != null && ! TargetMode . CREATE . equals ( mode ) ) { final UUID classUUID = ( ( UIFieldForm ) element ) . getClassificationUUID ( ) ; uuid2InstanceKey . put ( classUUID , instanceKey ) ; } iter2 . remove ( ) ; } } addClassElements ( _uiclass , uuid2InstanceKey ) ;


signature:
public class UIForm { /** * Method to add a Cell to the given Row .
 * @ param _ formElement the form element
 * @ param _ query query containing the values
 * @ param _ field field the cell belongs to
 * @ return true if the cell was actually added , else false
 * @ throws EFapsException on error */
private boolean addCell2FormRow ( final FormElement _formElement , final PrintQuery _query , final Field _field ) throws EFapsException { } }

implementation:
boolean ret = true ; Attribute attr = null ; if ( _field . getAttribute ( ) != null ) { attr = _query . getAttribute4Attribute ( _field . getAttribute ( ) ) ; } else if ( _field . getSelect ( ) != null ) { attr = _query . getAttribute4Select ( _field . getSelect ( ) ) ; } final Instance fieldInstance = evaluateFieldInstance ( _query , _field ) ; if ( _field . isHiddenDisplay ( getMode ( ) ) ) { if ( _field . getAttribute ( ) != null ) { _query . getAttribute ( _field . getAttribute ( ) ) ; } else if ( _field . getSelect ( ) != null ) { _query . getSelect ( _field . getSelect ( ) ) ; } else if ( _field . getPhrase ( ) != null ) { _query . getPhrase ( _field . getName ( ) ) ; } addHidden ( evaluateUIProvider ( _query , _field , fieldInstance , attr ) ) ; ret = false ; } else { // fieldset
if ( _field instanceof FieldSet ) { _formElement . addValue ( evaluateFieldSet ( _query , _field , fieldInstance ) ) ; } else if ( _field instanceof FieldCommand ) { final UICmdField cell = new UICmdField ( this , ( FieldCommand ) _field , getInstance ( ) ) ; _formElement . addValue ( cell ) ; } else if ( _field instanceof FieldPicker ) { final UIField cell = new UIField ( this , getInstance ( ) . getKey ( ) , UIValue . get ( _field , attr , null ) . setClassObject ( this ) . setInstance ( getInstance ( ) ) . setCallInstance ( getInstance ( ) ) ) ; final UIPicker picker = new UIPicker ( ( FieldPicker ) _field , cell ) ; cell . setPicker ( picker ) ; _formElement . addValue ( cell ) ; } else { _formElement . addValue ( evaluateUIProvider ( _query , _field , fieldInstance , attr ) ) ; } } return ret ;


signature:
public class UIForm { /** * Method evaluates a Field and adds it to the row .
 * @ param _ print query containing the values
 * @ param _ field field the cell belongs to
 * @ param _ fieldInstance instance of the Field
 * @ param _ attr attribute for the Field
 * @ return the UI field
 * @ throws EFapsException on error */
private UIField evaluateUIProvider ( final PrintQuery _print , final Field _field , final Instance _fieldInstance , final Attribute _attr ) throws EFapsException { } }

implementation: Object value = null ; if ( _field . getAttribute ( ) != null ) { value = _print . < Object > getAttribute ( _field . getAttribute ( ) ) ; } else if ( _field . getSelect ( ) != null ) { value = _print . < Object > getSelect ( _field . getSelect ( ) ) ; } else if ( _field . getPhrase ( ) != null ) { value = _print . getPhrase ( _field . getName ( ) ) ; } else if ( _field . getMsgPhrase ( ) != null ) { value = _print . getMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( _field ) ) , _field . getMsgPhrase ( ) ) ; } final UIField uiField = new UIField ( this , _fieldInstance . getKey ( ) , UIValue . get ( _field , _attr , value ) . setInstance ( _fieldInstance ) . setCallInstance ( getInstance ( ) ) . setClassObject ( this ) ) ; return uiField ;


signature:
public class UIForm { /** * Method evaluates a FieldSet and adds it to the row .
 * @ param _ query query containing the values
 * @ param _ field field the cell belongs to
 * @ param _ fieldInstance instance of the FieldSet
 * @ return the UI field set
 * @ throws EFapsException on error */
private UIFieldSet evaluateFieldSet ( final PrintQuery _query , final Field _field , final Instance _fieldInstance ) throws EFapsException { } }

implementation: final AttributeSet attrSet = AttributeSet . find ( getInstance ( ) . getType ( ) . getName ( ) , _field . getAttribute ( ) ) ; final Map < ? , ? > tmp = ( Map < ? , ? > ) _query . getAttributeSet ( _field . getAttribute ( ) ) ; final List < Instance > fieldins = new ArrayList < > ( ) ; if ( tmp != null ) { fieldins . addAll ( _query . getInstances4Attribute ( _field . getAttribute ( ) ) ) ; } final UIFieldSet ret = new UIFieldSet ( this , _fieldInstance , UIValue . get ( _field , getInstance ( ) . getType ( ) . getAttribute ( _field . getAttribute ( ) ) , null ) ) ; ret . setMode ( getMode ( ) ) ; for ( final String attrName : ( ( FieldSet ) _field ) . getOrder ( ) ) { final Attribute child = attrSet . getAttribute ( attrName ) ; final UIFieldSetColHeader column = new UIFieldSetColHeader ( _field . getLabel ( ) , child , _field ) ; ret . addHeader ( column ) ; } final Iterator < Instance > iter = fieldins . iterator ( ) ; final Map < String , Iterator < ? > > values = new HashMap < > ( ) ; while ( iter . hasNext ( ) ) { final Instance rowInstance = iter . next ( ) ; ret . addRow ( rowInstance ) ; for ( final String attrName : ( ( FieldSet ) _field ) . getOrder ( ) ) { final Attribute child = attrSet . getAttribute ( attrName ) ; Iterator < ? > valIter = values . get ( attrName ) ; if ( valIter == null ) { final List < ? > tmplist = ( List < ? > ) tmp . get ( attrName ) ; valIter = tmplist . iterator ( ) ; values . put ( attrName , valIter ) ; } final UIValue uiValue = UIValue . get ( _field , child , valIter . hasNext ( ) ? valIter . next ( ) : null ) ; ret . addValue ( rowInstance , new UIFieldSetValue ( this , rowInstance . getKey ( ) , ret , uiValue ) ) ; } } return ret ;


signature:
public class UIForm { /** * Recursive method to add the children classification forms .
 * @ param _ uiclass parent classification form
 * @ param _ uuid2InstanceKey mapping of instancekeys
 * @ return List of elements to be added
 * @ throws EFapsException on error */
private List < Element > getClassElements ( final UIClassification _uiclass , final Map < UUID , String > _uuid2InstanceKey ) throws EFapsException { } }

implementation:
final List < Element > ret = new ArrayList < > ( ) ; if ( _uiclass . isSelected ( ) && ! _uiclass . isRoot ( ) ) { final UIFieldForm fieldform ; if ( _uuid2InstanceKey . containsKey ( _uiclass . getClassificationUUID ( ) ) ) { fieldform = new UIFieldForm ( getCommandUUID ( ) , _uuid2InstanceKey . get ( _uiclass . getClassificationUUID ( ) ) ) ; } else { fieldform = new UIFieldForm ( getCommandUUID ( ) , _uiclass ) ; if ( isEditMode ( ) ) { // in edit mode , if there is no classification yet , create
// mode must be forced
fieldform . setMode ( TargetMode . CREATE ) ; } } ret . add ( new Element ( ElementType . SUBFORM , fieldform ) ) ; } for ( final UIClassification child : _uiclass . getChildren ( ) ) { ret . addAll ( getClassElements ( child , _uuid2InstanceKey ) ) ; } Collections . sort ( ret , ( _o1 , _o2 ) -> ( ( UIFieldForm ) _o1 . getElement ( ) ) . getWeight ( ) . compareTo ( ( ( UIFieldForm ) _o2 . getElement ( ) ) . getWeight ( ) ) ) ; return ret ;


signature:
public class UIForm { /** * Method to execute the form in case of create or search .
 * @ throws EFapsException on error */
private void execute4NoInstance ( ) throws EFapsException { } }

implementation:
final Form form = getForm ( ) ; Type type = null ; if ( isCreateMode ( ) || isEditMode ( ) ) { type = getCreateTargetType ( ) ; } else { final List < EventDefinition > events = this . getCommand ( ) . getEvents ( EventType . UI_TABLE_EVALUATE ) ; if ( events != null ) { for ( final EventDefinition eventDef : events ) { String tmp = eventDef . getProperty ( "Type" ) ; if ( tmp == null ) { tmp = eventDef . getProperty ( "Types" ) ; if ( tmp != null ) { UIForm . LOG . warn ( "Event '{}' uses deprecated API for type." , eventDef . getName ( ) ) ; } else { UIForm . LOG . error ( "Event '{}' is not type property" , eventDef . getName ( ) ) ; } } if ( tmp != null ) { type = Type . get ( tmp ) ; break ; } } } } FormElement currentFormElement = null ; boolean addNew = true ; UIClassification uiclass = null ; boolean firstTable = true ; for ( final Field field : form . getFields ( ) ) { if ( field . hasAccess ( getMode ( ) , AbstractInstanceObject . getInstance4Create ( type ) , this . getCommand ( ) , getInstance ( ) ) && ! field . isNoneDisplay ( getMode ( ) ) ) { if ( field instanceof FieldGroup ) { final FieldGroup group = ( FieldGroup ) field ; // in case that the first field is a group the element must be initiated
if ( currentFormElement == null ) { currentFormElement = new FormElement ( ) ; this . elements . add ( new Element ( UIForm . ElementType . FORM , currentFormElement ) ) ; addNew = false ; } currentFormElement . setGroupCount ( group . getGroupCount ( ) ) ; } else if ( field instanceof FieldHeading ) { this . elements . add ( new Element ( UIForm . ElementType . HEADING , new UIHeading ( ( FieldHeading ) field ) ) ) ; addNew = true ; } else if ( field instanceof FieldClassification ) { uiclass = UIClassification . getUIClassification ( field , this ) ; this . elements . add ( new Element ( UIForm . ElementType . CLASSIFICATION , uiclass ) ) ; this . classified = true ; addNew = true ; } else if ( field instanceof FieldTable ) { if ( ( ( FieldTable ) field ) . getTargetStructurBrowserField ( ) == null ) { final UIFieldTable uiFieldTable = new UIFieldTable ( getCommandUUID ( ) , getInstanceKey ( ) , ( FieldTable ) field ) ; this . elements . add ( new Element ( UIForm . ElementType . TABLE , uiFieldTable ) ) ; if ( firstTable ) { firstTable = false ; } else { uiFieldTable . setFirstTable ( false ) ; } } else { if ( "GridX" . equals ( Configuration . getAttribute ( ConfigAttribute . STRUCBRWSR_DEFAULTTYPEFORM ) ) ) { final UIFieldGrid grid = UIFieldGrid . get ( getCommandUUID ( ) , getPagePosition ( ) , getInstance ( ) , ( FieldTable ) field ) ; this . elements . add ( new Element ( UIForm . ElementType . GRID , grid ) ) ; } else { final UIFieldStructurBrowser uiFieldStrucBrws = new UIFieldStructurBrowser ( getCommandUUID ( ) , getInstanceKey ( ) , ( FieldTable ) field ) ; this . elements . add ( new Element ( UIForm . ElementType . STRUCBRWS , uiFieldStrucBrws ) ) ; } } addNew = true ; } else { if ( addNew ) { final FormElement formElement = new FormElement ( ) . setGroupCount ( currentFormElement == null ? 0 : currentFormElement . getGroupCount ( ) ) ; currentFormElement = formElement ; this . elements . add ( new Element ( UIForm . ElementType . FORM , currentFormElement ) ) ; addNew = false ; } final Attribute attr ; if ( field . getAttribute ( ) == null && field . getSelect ( ) != null && type != null ) { final PrintQuery print = new PrintQuery ( AbstractInstanceObject . getInstance4Create ( type ) ) ; print . addSelect ( field . getSelect ( ) ) ; print . dryRun ( ) ; attr = print . getAttribute4Select ( field . getSelect ( ) ) ; } else { attr = type != null ? type . getAttribute ( field . getAttribute ( ) ) : null ; } if ( field . isHiddenDisplay ( getMode ( ) ) ) { final UIField uiField = new UIField ( this , null , UIValue . get ( field , attr , null ) . setClassObject ( this ) . setInstance ( getInstance ( ) ) . setCallInstance ( getInstance ( ) ) ) ; addHidden ( uiField ) ; } else { final IUIElement cell ; if ( field instanceof FieldSet ) { cell = new UIFieldSet ( this , getInstance ( ) , UIValue . get ( field , attr , null ) . setClassObject ( this ) . setInstance ( getInstance ( ) ) . setCallInstance ( getInstance ( ) ) ) ; if ( type == null ) { ( ( UIFieldSet ) cell ) . addHeader ( new UIFieldSetColHeader ( field . getLabel ( ) , null , field ) ) ; } else { final AttributeSet set = AttributeSet . find ( type . getName ( ) , field . getAttribute ( ) ) ; for ( final String attrName : ( ( FieldSet ) field ) . getOrder ( ) ) { final Attribute child = set . getAttribute ( attrName ) ; final UIFieldSetColHeader column = new UIFieldSetColHeader ( field . getLabel ( ) , child , field ) ; ( ( UIFieldSet ) cell ) . addHeader ( column ) ; } } } else if ( field instanceof FieldCommand ) { cell = new UICmdField ( this , ( FieldCommand ) field , getInstance ( ) ) ; } else if ( field instanceof FieldPicker ) { cell = new UIField ( this , null , UIValue . get ( field , attr , null ) . setClassObject ( this ) . setInstance ( getInstance ( ) ) . setCallInstance ( getInstance ( ) ) ) ; final UIPicker picker = new UIPicker ( ( FieldPicker ) field , ( AbstractInstanceObject ) cell ) ; ( ( UIField ) cell ) . setPicker ( picker ) ; } else { cell = new UIField ( this , null , UIValue . get ( field , attr , super . isPartOfWizardCall ( ) ? getValue4Wizard ( field . getName ( ) ) : null ) . setClassObject ( this ) . setInstance ( AbstractInstanceObject . getInstance4Create ( type ) ) . setCallInstance ( getInstance ( ) ) ) ; } currentFormElement . addValue ( cell ) ; } } } } if ( uiclass != null ) { final Set < Classification > clazzes = this . getCommand ( ) . getTargetCreateClassification ( ) ; for ( final Classification clazz : clazzes ) { uiclass . addSelectedUUID ( clazz . getUUID ( ) ) ; Classification parent = clazz . getParentClassification ( ) ; while ( parent != null ) { uiclass . addSelectedUUID ( parent . getUUID ( ) ) ; parent = parent . getParentClassification ( ) ; } } if ( ! uiclass . isInitialized ( ) ) { uiclass . execute ( null ) ; } this . elements . addAll ( getClassElements ( uiclass , new HashMap < UUID , String > ( ) ) ) ; }


signature:
public class UIForm { /** * This is the setter method for the instance variable { @ link # formUUID } .
 * @ param _ formUUID the formUUID to set
 * @ throws CacheReloadException on error */
public void setFormUUID ( final UUID _formUUID ) throws CacheReloadException { } }

implementation: this . formUUID = _formUUID ; if ( _formUUID != null ) { this . multiPart = "true" . equalsIgnoreCase ( getForm ( ) . getProperty ( UIFormProperty . MULTI_PART ) ) ; }


signature:
public class ContentPaneBehavior { /** * The tag of the related component must be set , so that a dojo
 * BorderContainer will be rendered .
 * @ param _ component component this Behavior belongs to
 * @ param _ tag Tag to write to */
@ Override public void onComponentTag ( final Component _component , final ComponentTag _tag ) { } }

implementation: super . onComponentTag ( _component , _tag ) ; if ( isLayoutContainer ( ) ) { _tag . put ( "data-dojo-type" , "dijit/layout/LayoutContainer" ) ; } else { _tag . put ( "data-dojo-type" , isJsExecuteable ( ) ? "dojox/layout/ContentPane" : "dijit/layout/ContentPane" ) ; if ( isJsExecuteable ( ) ) { _tag . put ( "scriptHasHooks" , "true" ) ; } } if ( this . region != null ) { _tag . append ( "data-dojo-props" , "region: '" + this . region . getKey ( ) + "'" , "," ) ; } if ( this . splitter ) { _tag . append ( "data-dojo-props" , "splitter: true" , "," ) ; } if ( this . splitterState != null ) { _tag . append ( "data-dojo-props" , "toggleSplitterState: \"" + this . splitterState + "\"" , "," ) ; } if ( this . width != null ) { _tag . append ( "style" , "width: " + this . width , ";" ) ; } if ( this . height != null ) { _tag . append ( "style" , "height: " + this . height , ";" ) ; }


signature:
public class ContentPaneBehavior { /** * 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 ) ; _response . render ( RequireHeaderItem . forClasses ( isJsExecuteable ( ) ? DojoClasses . ContentPaneX : DojoClasses . ContentPane , DojoClasses . LayoutContainer , DojoClasses . parser ) ) ;


signature:
public class SlideIn { /** * Gets the menu item .
 * @ param _ menuItem the menu item
 * @ return the menu item */
private CharSequence getMenuItem ( final UIMenuItem _menuItem ) { } }

implementation: final StringBuilder js = new StringBuilder ( ) ; final String node1 = RandomUtil . randomAlphabetic ( 4 ) ; final String node2 = RandomUtil . randomAlphabetic ( 4 ) ; js . append ( "var " ) . append ( node1 ) . append ( " = domConstruct.create(\"div\", { class: \"menueentry\"}, sn);\n" ) . append ( "var " ) . append ( node2 ) . append ( " = domConstruct.create(\"div\", { class: \"title" ) ; if ( ! _menuItem . getChildren ( ) . isEmpty ( ) ) { js . append ( " closed" ) ; } js . append ( "\"}," ) . append ( node1 ) . append ( ");\n" ) . append ( getImage ( _menuItem , node2 ) ) . append ( "domConstruct.create(\"span\", { class: \"menutitle\", innerHTML: \"" ) . append ( StringEscapeUtils . escapeEcmaScript ( StringEscapeUtils . escapeHtml4 ( _menuItem . getLabel ( ) ) ) ) . append ( "\"} , " ) . append ( node2 ) . append ( "); \n" ) . append ( getSubMenuItem ( _menuItem , node1 , node2 ) ) ; return js ;


signature:
public class SlideIn { /** * Gets the sub menu item .
 * @ param _ menuItem the menu item
 * @ param _ parentNode the parent node
 * @ param _ titleNode the title node
 * @ return the sub menu item */
private CharSequence getSubMenuItem ( final UIMenuItem _menuItem , final String _parentNode , final String _titleNode ) { } }

implementation: final StringBuilder js = new StringBuilder ( ) ; final String node1 = RandomUtil . randomAlphabetic ( 4 ) ; if ( _menuItem . getChildren ( ) . isEmpty ( ) ) { js . append ( " on(" ) . append ( _titleNode ) . append ( ", \"click\", function(evt) {\n" ) . append ( getEventJs ( _menuItem ) ) . append ( "});\n" ) ; } else { js . append ( "var " ) . append ( node1 ) . append ( " = domConstruct.create(\"div\"," ) . append ( "{ class: \"nested\", style: \"display:none\"}, " ) . append ( _parentNode ) . append ( ");\n" ) . append ( " on(" ) . append ( _titleNode ) . append ( ", \"click\", function(evt) {\n" ) . append ( "if (domStyle.get(" ) . append ( node1 ) . append ( ", \"display\") !== \"none\") {\n" ) . append ( " domClass.replace(evt.currentTarget, \"closed\", \"open\"); \n" ) . append ( "fx.wipeOut({\n" ) . append ( "node: " ) . append ( node1 ) . append ( "\n" ) . append ( "}).play();\n" ) . append ( "} else {\n" ) . append ( " domClass.replace(evt.currentTarget, \"open\", \"closed\"); \n" ) . append ( "fx.wipeIn({\n" ) . append ( "node: " ) . append ( node1 ) . append ( "\n" ) . append ( "}).play();\n" ) . append ( "}\n" ) . append ( "});\n" ) ; } for ( final UIMenuItem childItem : _menuItem . getChildren ( ) ) { final String node2 = RandomUtil . randomAlphabetic ( 4 ) ; final String node3 = RandomUtil . randomAlphabetic ( 4 ) ; js . append ( "var " ) . append ( node2 ) . append ( " = domConstruct.create(\"div\"," ) . append ( "{ class: \"menueentry\"}, " ) . append ( node1 ) . append ( ");\n" ) . append ( "var " ) . append ( node3 ) . append ( " = domConstruct.create(\"div\", { class: \"title" ) ; if ( ! childItem . getChildren ( ) . isEmpty ( ) ) { js . append ( " closed" ) ; } js . append ( "\"}," ) . append ( node2 ) . append ( ");\n" ) . append ( getImage ( childItem , node3 ) ) . append ( "domConstruct.create(\"span\", { class: \"menutitle\", innerHTML: \"" ) . append ( StringEscapeUtils . escapeEcmaScript ( StringEscapeUtils . escapeHtml4 ( childItem . getLabel ( ) ) ) ) . append ( "\"} , " ) . append ( node3 ) . append ( "); \n" ) . append ( getSubMenuItem ( childItem , node2 , node3 ) ) ; } return js ;


signature:
public class SlideIn { /** * Gets the url .
 * @ param _ menuItem the menu item
 * @ return the url */
private CharSequence getEventJs ( final UIMenuItem _menuItem ) { } }

implementation: final String key = RandomUtil . randomAlphabetic ( 8 ) ; this . menuItems . put ( key , _menuItem ) ; final StringBuilder ret = new StringBuilder ( ) ; switch ( _menuItem . getTarget ( ) ) { case HIDDEN : ret . append ( getBehavior ( ExecBehavior . class ) . getCallbackFunctionBody ( CallbackParameter . converted ( "m" , "\"" + key + "\"" ) ) ) ; break ; case MODAL : ret . append ( getBehavior ( OpenModalBehavior . class ) . getCallbackFunctionBody ( CallbackParameter . converted ( "m" , "\"" + key + "\"" ) ) ) ; break ; case POPUP : final PageParameters popupPageParameters = new PageParameters ( ) ; popupPageParameters . add ( "m" , key ) ; final PopupSettings popupSettings = new PopupSettings ( ) ; popupSettings . setHeight ( _menuItem . getWindowHeight ( ) ) ; popupSettings . setWidth ( _menuItem . getWindowWidth ( ) ) ; popupSettings . setTarget ( "'" + urlForListener ( popupPageParameters ) + "'" ) ; popupSettings . setWindowName ( "eFapsPopup" ) ; ret . append ( "(function () {" ) . append ( popupSettings . getPopupJavaScript ( ) ) . append ( "}) ();" ) ; break ; default : final PageParameters pageParameters = new PageParameters ( ) ; pageParameters . add ( "m" , key ) ; ret . append ( "registry.byId(\"" ) . append ( "mainPanel" ) . append ( "\").set(\"content\", domConstruct.create(\"iframe\", {" ) . append ( "\"id\": \"" ) . append ( MainPage . IFRAME_ID ) . append ( "\",\"src\": \"" ) . append ( urlForListener ( pageParameters ) ) . append ( "\",\"style\": \"border: 0; width: 100%; height: 99%\"" ) . append ( ",\"id\": \"" ) . append ( MainPage . IFRAME_ID ) . append ( "\"" ) . append ( "}));" ) ; break ; } return ret ;


signature:
public class SlideIn { /** * Gets the image .
 * @ param _ menuItem the menu item
 * @ param _ node the node
 * @ return the image */
private CharSequence getImage ( final UIMenuItem _menuItem , final String _node ) { } }

implementation:
final String label = _menuItem . getLabel ( ) ; String content = "" ; if ( StringUtils . isNotEmpty ( label ) ) { content = StringUtils . left ( label , 1 ) . toUpperCase ( ) ; } final StringBuilder js = new StringBuilder ( ) ; if ( StringUtils . isNotEmpty ( _menuItem . getImage ( ) ) && _menuItem . getImage ( ) . endsWith ( ".svg" ) ) { try { final QueryBuilder querBldr = new QueryBuilder ( CIAdminUserInterface . Image ) ; querBldr . addWhereAttrEqValue ( CIAdminUserInterface . Image . Name , _menuItem . getImage ( ) ) ; final InstanceQuery query = querBldr . getQuery ( ) ; query . execute ( ) ; if ( query . next ( ) ) { final Checkout checkout = new Checkout ( query . getCurrentValue ( ) ) ; final ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; checkout . execute ( os ) ; final String svg = new String ( os . toByteArray ( ) , StandardCharsets . UTF_8 ) ; js . append ( "domConstruct.create(\"span\", {\n" ) . append ( "innerHTML: \"" ) . append ( StringEscapeUtils . escapeEcmaScript ( svg ) ) . append ( "\"\n" ) . append ( "}, " ) . append ( _node ) . append ( ");\n" ) ; } } catch ( final EFapsException e ) { // TODO Auto - generated catch block
e . printStackTrace ( ) ; } } else { js . append ( "domConstruct.create(\"span\", {\n" ) . append ( "class: \"circle " ) . append ( content ) . append ( " \"\n," ) . append ( "innerHTML: \"" ) . append ( content ) . append ( "\"\n" ) . append ( "}, " ) . append ( _node ) . append ( ");\n" ) ; } return js ;


signature:
public class SlideIn { /** * Gets the behavior .
 * @ param _ class the class
 * @ return the behavior */
protected AjaxEventBehavior getBehavior ( final Class < ? extends Behavior > _class ) { } }

implementation: final SlideInPanel panel = ( SlideInPanel ) getParent ( ) ; return panel . visitChildren ( AjaxMenuItem . class , ( _item , _visit ) -> { final List < ? extends Behavior > behaviors = _item . getBehaviors ( _class ) ; if ( CollectionUtils . isNotEmpty ( behaviors ) ) { _visit . stop ( ( AjaxEventBehavior ) behaviors . get ( 0 ) ) ; } else { _visit . stop ( ) ; } } ) ;


signature:
public class UIFieldGrid { /** * Gets the .
 * @ param _ commandUUID the command UUID
 * @ param _ pagePosition the page position
 * @ param _ callInstance the call instance
 * @ param _ fieldTable the field table
 * @ return the UI grid */
public static UIFieldGrid get ( final UUID _commandUUID , final PagePosition _pagePosition , final Instance _callInstance , final FieldTable _fieldTable ) { } }

implementation: final UIFieldGrid ret = new UIFieldGrid ( ) ; ret . setFieldId ( _fieldTable . getId ( ) ) . setCmdUUID ( _commandUUID ) . setPagePosition ( _pagePosition ) . setCallInstance ( _callInstance ) ; return ret ;