idx
int64
0
41.2k
question
stringlengths
74
4.04k
target
stringlengths
7
750
21,200
public final void load ( final String filename ) { logger . debug ( "Loading the cache from places file: " + filename ) ; try ( InputStream fis = new FileInputStream ( filename ) ; ) { load ( fis ) ; } catch ( IOException e ) { logger . error ( "Problem reading places file" , e ) ; } }
Read places from a data file . The file is | separated . It may contain just a historical place name or both historical and modern places names .
21,201
private static Feature createLocation ( final Point point , final LocationType locationType ) { final Feature location = new Feature ( ) ; location . setGeometry ( point ) ; location . setProperty ( "locationType" , locationType ) ; location . setId ( "location" ) ; return location ; }
Convert a Point and LocationType into a Feature .
21,202
public void checkFamily ( final Family family ) { final LocalDate familyDate = analyzeDates ( family ) ; final LocalDate seenDate = earliestDate ( seenFamily ) ; if ( seenDate == null ) { if ( familyDate != null ) { seenFamily = family ; } } else { if ( familyDate != null ) { if ( familyDate . isBefore ( seenDate ) ) {...
Check this family for internal order and relative order to the other families for this person .
21,203
private LocalDate analyzeDates ( final Family family ) { if ( family == null ) { return null ; } LocalDate earliestDate = null ; final FamilyAnalysisVisitor visitor = new FamilyAnalysisVisitor ( ) ; family . accept ( visitor ) ; for ( final Attribute attribute : visitor . getTrimmedAttributes ( ) ) { basicOrderCheck ( ...
Analyze the family . Add any date order problems to the analysis .
21,204
@ RequestMapping ( value = "/v1/upload" , method = RequestMethod . POST , consumes = "multipart/form-data" ) public final ApiHead upload ( @ RequestParam ( "file" ) final MultipartFile file ) { if ( file == null ) { logger . info ( "in file upload: file is null" ) ; return null ; } logger . info ( "in file upload: " + ...
Controller for uploading new GEDCOM files .
21,205
protected static final StringBuilder renderPad ( final StringBuilder builder , final int pad , final boolean newLine ) { renderNewLine ( builder , newLine ) ; for ( int i = 0 ; i < pad ; i ++ ) { builder . append ( ' ' ) ; } return builder ; }
Render some leading spaces onto a line of html .
21,206
public final void visit ( final Attribute attribute ) { attributes . add ( attribute ) ; if ( ignoreable ( attribute ) ) { return ; } trimmedAttributes . add ( attribute ) ; }
Visit an Attribute . Track the complete list of Attributes and a list trimmed by removing ignoreable attributes .
21,207
@ RequestMapping ( "/submission" ) public final String submission ( @ RequestParam ( value = "id" , required = false , defaultValue = "SUBN1" ) final String idString , @ RequestParam ( value = "db" , required = false , defaultValue = "schoeller" ) final String dbName , final Model model ) { logger . debug ( "Entering s...
Connects HTML template file with data for the submission page .
21,208
private String loginDestinationUrl ( final HttpServletRequest request ) { final HttpSession session = request . getSession ( ) ; final String requestReferer = request . getHeader ( "referer" ) ; final String sessionReferer = ( String ) session . getAttribute ( SESSION_REFERER_KEY ) ; if ( useReferer ( requestReferer ) ...
Try to figure out where to go after login . We have to do a few tricks in order to carry that around .
21,209
public LocalDate estimateFromMarriage ( final LocalDate localDate ) { if ( localDate != null ) { return localDate ; } final PersonNavigator navigator = new PersonNavigator ( person ) ; final List < Family > families = navigator . getFamiliesC ( ) ; LocalDate date = null ; for ( final Family family : families ) { date =...
Try recursing through the ancestors to find a marriage date .
21,210
private LocalDate estimateFromParentMarriage ( final Person parent ) { final BirthDateEstimator bde = createEstimator ( parent ) ; return estimateFromParentMarriage ( bde ) ; }
Estimate birth date from parent s marriage .
21,211
private LocalDate ancestorAdjustment ( final LocalDate date ) { if ( date == null ) { return null ; } return date . plusYears ( typicals . ageAtMarriage ( ) + typicals . gapBetweenChildren ( ) ) . withMonthOfYear ( 1 ) . withDayOfMonth ( 1 ) ; }
Apply a standard adjustment from an ancestor s marriage date to a person s birth date .
21,212
private LocalDate childAdjustment ( final LocalDate date ) { if ( date == null ) { return date ; } return date . plusYears ( typicals . gapBetweenChildren ( ) ) . withMonthOfYear ( 1 ) . withDayOfMonth ( 1 ) ; }
Adjust by the gap between children and to beginning of month .
21,213
private static String buildParentString ( final String tag , final String tail ) { if ( tail . isEmpty ( ) ) { return tag ; } else { return tag + " " + tail ; } }
The parent can only take one string . If we need to concatenate the strings . The argument tag should never be empty but tail could be .
21,214
public void visit ( final Child child ) { final Person person = child . getChild ( ) ; if ( child . isSet ( ) && person . isSet ( ) ) { childList . add ( child ) ; children . add ( person ) ; } }
Visit a Child . We track this and if set the Person who is the child .
21,215
public void visit ( final Family family ) { for ( final GedObject gob : family . getAttributes ( ) ) { gob . accept ( this ) ; } }
Visit a Family . This is the primary focus of the visitation . From here interesting information is gathered from the attributes .
21,216
public void visit ( final Husband husband ) { this . husbandFound = husband ; if ( husband . isSet ( ) ) { father = husband . getFather ( ) ; spouses . add ( father ) ; } }
Visit a Husband . We track this and if set the Person who is the father .
21,217
public void visit ( final Wife wife ) { this . wifeFound = wife ; if ( wife . isSet ( ) ) { mother = wife . getMother ( ) ; spouses . add ( mother ) ; } }
Visit a Wife . We track this and if set the Person who is the mother .
21,218
public ApiPerson createOne ( final String db , final ApiPerson person ) { logger . info ( "Entering create person in db: " + db ) ; return create ( readRoot ( db ) , person , ( i , id ) -> new ApiPerson ( i , id ) ) ; }
Create a new person from the passed object .
21,219
public void visit ( final Attribute attribute ) { if ( "Restriction" . equals ( attribute . getString ( ) ) && "confidential" . equals ( attribute . getTail ( ) ) ) { isConfidential = true ; } }
Visit an Attribute . Certain Attributes contribute interest data .
21,220
public GeoCodeItem toGeoCodeItem ( final GeoServiceItem gsItem ) { if ( gsItem == null ) { return null ; } return new GeoCodeItem ( gsItem . getPlaceName ( ) , gsItem . getModernPlaceName ( ) , toGeocodingResult ( gsItem . getResult ( ) ) ) ; }
Create a GeoCodeItem from a GeoServiceItem .
21,221
public GeocodingResult toGeocodingResult ( final GeoServiceGeocodingResult gsResult ) { if ( gsResult == null ) { return null ; } final GeocodingResult result = new GeocodingResult ( ) ; final AddressComponent [ ] addressComponents = gsResult . getAddressComponents ( ) ; if ( addressComponents == null ) { result . addr...
Create a GeocodingResult from a GeoServiceGeocodingResult .
21,222
private AddressComponent copy ( final AddressComponent in ) { final AddressComponent out = new AddressComponent ( ) ; out . longName = in . longName ; out . shortName = in . shortName ; out . types = Arrays . copyOf ( in . types , in . types . length ) ; return out ; }
Copy an address component . Since they are NOT immutable I don t want to mess with the variability of the damn things .
21,223
public Geometry toGeometry ( final FeatureCollection featureCollection ) { if ( featureCollection == null ) { return null ; } final Geometry geometry = new Geometry ( ) ; final Feature location = populateBoundaries ( geometry , featureCollection ) ; populateLocation ( geometry , location ) ; return geometry ; }
Create a Geometry from a GeoServiceGeometry .
21,224
private LocationType toLocationType ( final Object property ) { if ( property == null ) { return null ; } return LocationType . valueOf ( property . toString ( ) ) ; }
Convert a property to a Google LocationType .
21,225
public GeoServiceItem toGeoServiceItem ( final GeoCodeItem item ) { if ( item == null ) { return null ; } return new GeoServiceItem ( item . getPlaceName ( ) , item . getModernPlaceName ( ) , toGeoServiceGeocodingResult ( item . getGeocodingResult ( ) ) ) ; }
Create a GeoServiceItem from a GeoCodeItem .
21,226
public GeoServiceGeocodingResult toGeoServiceGeocodingResult ( final GeocodingResult result ) { if ( result == null ) { return null ; } return new GeoServiceGeocodingResult ( result . addressComponents , result . formattedAddress , result . postcodeLocalities , toGeoServiceGeometry ( result . geometry ) , result . type...
Create a GeoServiceGeocodingResult from a GeocodingResult .
21,227
public FeatureCollection toGeoServiceGeometry ( final Geometry geometry ) { if ( geometry == null ) { return GeoServiceGeometry . createFeatureCollection ( toLocationFeature ( new LatLng ( Double . NaN , Double . NaN ) , LocationType . UNKNOWN ) , null , null ) ; } return GeoServiceGeometry . createFeatureCollection ( ...
Create a GeoServiceGeometry from a Geometry .
21,228
public Person getMother ( ) { if ( ! isSet ( ) ) { return new Person ( ) ; } final Person mother = ( Person ) find ( getToString ( ) ) ; if ( mother == null ) { return new Person ( ) ; } else { return mother ; } }
Get the person that this object points to . If not found return an unset Person .
21,229
public void visit ( final Attribute attribute ) { for ( final GedObject gob : attribute . getAttributes ( ) ) { gob . accept ( this ) ; } }
Visit an Attributes . Look at Attributes to find Places .
21,230
public void visit ( final Person person ) { for ( final GedObject gob : person . getAttributes ( ) ) { gob . accept ( this ) ; } final PersonNavigator navigator = new PersonNavigator ( person ) ; for ( final Family family : navigator . getFamilies ( ) ) { family . accept ( this ) ; } }
Visit a Person . Look at Attributes and Families to find Places .
21,231
public void visit ( final Place place ) { placeStrings . add ( place . getString ( ) ) ; places . add ( place ) ; }
Visit a Place . The names of Places are collected .
21,232
public void visit ( final Root root ) { for ( final String letter : root . findSurnameInitialLetters ( ) ) { for ( final String surname : root . findBySurnamesBeginWith ( letter ) ) { for ( final Person person : root . findBySurname ( surname ) ) { person . accept ( this ) ; } } } }
Visit the Root . From here we will look through the top level objects for Persons . Persons direct to Places and Places are what we really want .
21,233
public void init ( ) { final String string = getString ( ) ; final int bpos = string . indexOf ( '/' ) ; if ( bpos == - 1 ) { prefix = string ; surname = "" ; suffix = "" ; } else { final int epos = string . indexOf ( '/' , bpos + 1 ) ; prefix = string . substring ( 0 , bpos ) ; surname = string . substring ( bpos + 1 ...
Parse the name string from GEDCOM normal into its component parts .
21,234
public void init ( ) { surnameIndex . clear ( ) ; final RootVisitor visitor = new RootVisitor ( ) ; mRoot . accept ( visitor ) ; for ( final Person person : visitor . getPersons ( ) ) { final String key = person . getString ( ) ; final String indexName = person . getIndexName ( ) ; if ( ! indexName . isEmpty ( ) ) { fi...
Initialize the index from the root s objects .
21,235
private SortedMap < String , SortedSet < String > > findNamesPerSurname ( final String surname ) { if ( surnameIndex . containsKey ( surname ) ) { return surnameIndex . get ( surname ) ; } final SortedMap < String , SortedSet < String > > namesPerSurname = new TreeMap < String , SortedSet < String > > ( ) ; surnameInde...
Find the map of full names to a sets of IDs for the given surname . If the surname is not already present create a new map and add it to the index .
21,236
private SortedSet < String > findIdsPerName ( final String indexName , final SortedMap < String , SortedSet < String > > names ) { if ( names . containsKey ( indexName ) ) { return names . get ( indexName ) ; } final TreeSet < String > idsPerName = new TreeSet < String > ( ) ; names . put ( indexName , idsPerName ) ; r...
Find the set of IDs associated with a full name in the provided map .
21,237
public Set < String > getNamesPerSurname ( final String surname ) { if ( surname == null ) { return Collections . emptySet ( ) ; } if ( ! surnameIndex . containsKey ( surname ) ) { return Collections . emptySet ( ) ; } return Collections . unmodifiableSet ( surnameIndex . get ( surname ) . keySet ( ) ) ; }
Get the set of full names that occur for a given surname .
21,238
private Map < String , SortedSet < String > > getNamesPerSurnameMap ( final String surname ) { if ( ! surnameIndex . containsKey ( surname ) ) { return Collections . emptyMap ( ) ; } return surnameIndex . get ( surname ) ; }
Get map of full names to sets of IDs for the provided surname .
21,239
public Set < String > getIdsPerName ( final String surname , final String name ) { if ( surname == null || name == null ) { return Collections . emptySet ( ) ; } final Map < String , SortedSet < String > > namesPerSurname = getNamesPerSurnameMap ( surname ) ; if ( ! namesPerSurname . containsKey ( name ) ) { return Col...
Get the set of IDs for the given surname and full name .
21,240
protected final LocalDate estimateFromOtherEvents ( final LocalDate localDate ) { if ( localDate != null ) { return localDate ; } final PersonAnalysisVisitor visitor = new PersonAnalysisVisitor ( ) ; person . accept ( visitor ) ; for ( final Attribute attr : visitor . getAttributes ( ) ) { final String dateString = get...
Try other lifecycle events .
21,241
public Person getFather ( ) { if ( ! isSet ( ) ) { return new Person ( ) ; } final Person father = ( Person ) find ( getToString ( ) ) ; if ( father == null ) { return new Person ( ) ; } else { return father ; } }
Get the person that this object refers to . If not found return an unset Person .
21,242
public static PrimitiveMatrix toCorrelations ( Access2D < ? > covariances , boolean clean ) { int size = Math . toIntExact ( Math . min ( covariances . countRows ( ) , covariances . countColumns ( ) ) ) ; MatrixStore < Double > covarianceMtrx = MatrixStore . PRIMITIVE . makeWrapper ( covariances ) . get ( ) ; if ( clea...
Will extract the correlation coefficients from the input covariance matrix . If cleaning is enabled small and negative eigenvalues of the covariance matrix will be replaced with a new minimal value .
21,243
static ResourceLocator . Request buildChallengeRequest ( ResourceLocator . Session session , String symbol ) { return session . request ( ) . host ( FINANCE_YAHOO_COM ) . path ( "/quote/" + symbol + "/options" ) ; }
A request that requires consent and will set the B cookie but not the crumb
21,244
protected PrimitiveMatrix calculateAssetWeights ( ) { if ( this . getOptimisationOptions ( ) . logger_appender != null ) { BasicLogger . debug ( ) ; BasicLogger . debug ( "###################################################" ) ; BasicLogger . debug ( "BEGIN RAF: {} MarkowitzModel optimisation" , this . getRiskAversion ...
Constrained optimisation .
21,245
public static Scalar < ? > calculatePortfolioReturn ( final PrimitiveMatrix assetWeights , final PrimitiveMatrix assetReturns ) { return PrimitiveScalar . valueOf ( assetWeights . dot ( assetReturns ) ) ; }
Calculates the portfolio return using the input asset weights and returns .
21,246
public PrimitiveMatrix calculateAssetReturns ( final PrimitiveMatrix assetWeights ) { final PrimitiveMatrix tmpAssetWeights = myRiskAversion . compareTo ( DEFAULT_RISK_AVERSION ) == 0 ? assetWeights : assetWeights . multiply ( myRiskAversion ) ; return myCovariances . multiply ( tmpAssetWeights ) ; }
If the input vector of asset weights are the weights of the market portfolio then the ouput is the equilibrium excess returns .
21,247
public PrimitiveMatrix calculateAssetWeights ( final PrimitiveMatrix assetReturns ) { final PrimitiveMatrix tmpAssetWeights = myCovariances . solve ( assetReturns ) ; if ( myRiskAversion . compareTo ( DEFAULT_RISK_AVERSION ) == 0 ) { return tmpAssetWeights ; } else { return tmpAssetWeights . divide ( myRiskAversion ) ;...
If the input vector of returns are the equilibrium excess returns then the output is the market portfolio weights . This is unconstrained optimisation - there are no constraints on the resulting instrument weights .
21,248
public Scalar < ? > calculatePortfolioVariance ( final PrimitiveMatrix assetWeights ) { PrimitiveMatrix tmpLeft ; PrimitiveMatrix tmpRight ; if ( assetWeights . countColumns ( ) == 1L ) { tmpLeft = assetWeights . transpose ( ) ; tmpRight = assetWeights ; } else { tmpLeft = assetWeights ; tmpRight = assetWeights . trans...
Calculates the portfolio variance using the input instrument weights .
21,249
public MarketEquilibrium clean ( ) { final PrimitiveMatrix tmpAssetVolatilities = FinanceUtils . toVolatilities ( myCovariances , true ) ; final PrimitiveMatrix tmpCleanedCorrelations = FinanceUtils . toCorrelations ( myCovariances , true ) ; final PrimitiveMatrix tmpCovariances = FinanceUtils . toCovariances ( tmpAsse...
Equivalent to copying but additionally the covariance matrix will be cleaned of negative and very small eigenvalues to make it positive definite .
21,250
protected PrimitiveMatrix getViewReturns ( ) { final int tmpRowDim = myViews . size ( ) ; final int tmpColDim = 1 ; final PrimitiveMatrix . DenseReceiver retVal = MATRIX_FACTORY . makeDense ( tmpRowDim , tmpColDim ) ; double tmpRet ; final double tmpRAF = this . getRiskAversion ( ) . doubleValue ( ) ; for ( int i = 0 ;...
Scaled by risk aversion factor .
21,251
public User initialize ( String authCode , String redirectUri ) throws WorkspaceApiException { return initialize ( authCode , redirectUri , null , null ) ; }
Initialize the API using the provided authorization code and redirect URI . The authorization code comes from using the Authorization Code Grant flow to authenticate with the Authentication API .
21,252
public User initialize ( String token ) throws WorkspaceApiException { return initialize ( null , null , null , token ) ; }
Initialize the API using the provided access token .
21,253
public void destroy ( long disconnectRequestTimeout ) throws WorkspaceApiException { try { if ( this . workspaceInitialized ) { notifications . disconnect ( disconnectRequestTimeout ) ; sessionApi . logout ( ) ; } } catch ( Exception e ) { throw new WorkspaceApiException ( "destroy failed." , e ) ; } finally { this . w...
Ends the current agent s session . This request logs out the agent on all activated channels ends the HTTP session and cleans up related resources . After you end the session you ll need to make a login request before making any new calls to the API .
21,254
public void setAgentReady ( KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicereadyData readyData = new VoicereadyData ( ) ; readyData . setReasons ( Util . toKVList ( reasons ) ) ; readyData . setExtensions ( Util . toKVList ( extensions ) ) ; ReadyData data = new R...
Set the current agent s state to Ready on the voice channel .
21,255
public void dndOn ( ) throws WorkspaceApiException { try { ApiSuccessResponse response = this . voiceApi . setDNDOn ( null ) ; throwIfNotOk ( "dndOn" , response ) ; } catch ( ApiException e ) { throw new WorkspaceApiException ( "dndOn failed." , e ) ; } }
Set the current agent s state to Do Not Disturb on the voice channel .
21,256
public void dndOff ( ) throws WorkspaceApiException { try { ApiSuccessResponse response = this . voiceApi . setDNDOff ( null ) ; throwIfNotOk ( "dndOff" , response ) ; } catch ( ApiException e ) { throw new WorkspaceApiException ( "dndOff failed." , e ) ; } }
Turn off Do Not Disturb for the current agent on the voice channel .
21,257
public void setForward ( String destination ) throws WorkspaceApiException { try { VoicesetforwardData forwardData = new VoicesetforwardData ( ) ; forwardData . setForwardTo ( destination ) ; ForwardData data = new ForwardData ( ) ; data . data ( forwardData ) ; ApiSuccessResponse response = this . voiceApi . forward (...
Set call forwarding on the current agent s DN to the specified destination .
21,258
public void cancelForward ( ) throws WorkspaceApiException { try { ApiSuccessResponse response = this . voiceApi . cancelForward ( null ) ; throwIfNotOk ( "cancelForward" , response ) ; } catch ( ApiException e ) { throw new WorkspaceApiException ( "cancelForward failed." , e ) ; } }
Cancel call forwarding for the current agent .
21,259
public void answerCall ( String connId , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData answerData = new VoicecallsidanswerData ( ) ; answerData . setReasons ( Util . toKVList ( reasons ) ) ; answerData . setExtensions ( Util . toKVList ( extensi...
Answer the specified call .
21,260
public void holdCall ( String connId , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData holdData = new VoicecallsidanswerData ( ) ; holdData . setReasons ( Util . toKVList ( reasons ) ) ; holdData . setExtensions ( Util . toKVList ( extensions ) ) ...
Place the specified call on hold .
21,261
public void retrieveCall ( String connId , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData retrieveData = new VoicecallsidanswerData ( ) ; retrieveData . setReasons ( Util . toKVList ( reasons ) ) ; retrieveData . setExtensions ( Util . toKVList (...
Retrieve the specified call from hold .
21,262
public void releaseCall ( String connId , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData releaseData = new VoicecallsidanswerData ( ) ; releaseData . setReasons ( Util . toKVList ( reasons ) ) ; releaseData . setExtensions ( Util . toKVList ( ext...
Release the specified call .
21,263
public void initiateConference ( String connId , String destination , String location , String outboundCallerId , KeyValueCollection userData , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidinitiateconferenceData initData = new Voicecallsidinitiateconferen...
Initiate a two - step conference to the specified destination . This places the existing call on hold and creates a new call in the dialing state . After initiating the conference you can use completeConference to complete the conference and bring all parties into the same call .
21,264
public void completeConference ( String connId , String parentConnId ) throws WorkspaceApiException { this . completeConference ( connId , parentConnId , null , null ) ; }
Complete a previously initiated two - step conference identified by the provided IDs . Once completed the two separate calls are brought together so that all three parties are participating in the same call .
21,265
public void attachUserData ( String connId , KeyValueCollection userData ) throws WorkspaceApiException { try { VoicecallsidcompleteData completeData = new VoicecallsidcompleteData ( ) ; completeData . setUserData ( Util . toKVList ( userData ) ) ; UserDataOperationId data = new UserDataOperationId ( ) ; data . data ( ...
Attach the provided data to the call . This adds the data to the call even if data already exists with the provided keys .
21,266
public void deleteUserDataPair ( String connId , String key ) throws WorkspaceApiException { try { VoicecallsiddeleteuserdatapairData deletePairData = new VoicecallsiddeleteuserdatapairData ( ) ; deletePairData . setKey ( key ) ; KeyData data = new KeyData ( ) ; data . data ( deletePairData ) ; ApiSuccessResponse respo...
Delete data with the specified key from the call s user data .
21,267
public void redirectCall ( String connId , String destination ) throws WorkspaceApiException { this . redirectCall ( connId , destination , null , null ) ; }
Redirect a call to the specified destination .
21,268
public void redirectCall ( String connId , String destination , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidredirectData redirectData = new VoicecallsidredirectData ( ) ; redirectData . setDestination ( destination ) ; redirectData . setReasons ( Util . ...
Redirect a call to the specified destination
21,269
public void clearCall ( String connId , KeyValueCollection reasons , KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicecallsidanswerData clearData = new VoicecallsidanswerData ( ) ; clearData . setReasons ( Util . toKVList ( reasons ) ) ; clearData . setExtensions ( Util . toKVList ( extensions ...
End the conference call for all parties . This can be performed by any agent participating in the conference .
21,270
public ApiResponse < CurrentSession > getCurrentSessionWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = getCurrentSessionValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < CurrentSession > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnT...
Get information about the current user Get information about the current user including any existing media logins calls and interactions . The returned user information includes state recovery information about the active session . You can make this request at startup to check for an existing session .
21,271
public ApiResponse < CurrentSession > getUserInfoWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = getUserInfoValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < CurrentSession > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; }
Retrieve encrypted data about the current user This request can be used to retrieve encrypted data about the user to use with other services
21,272
public List < StatisticValue > peek ( String subscriptionId ) throws WorkspaceApiException { try { InlineResponse2002 resp = api . peek ( subscriptionId ) ; Util . throwIfNotOk ( resp . getStatus ( ) ) ; InlineResponse2002Data data = resp . getData ( ) ; if ( data == null ) { throw new WorkspaceApiException ( "Response...
Get the statistics for the specified subscription ID .
21,273
public void unsubscribe ( String subscriptionId ) throws WorkspaceApiException { try { ApiSuccessResponse resp = api . unsubscribe ( subscriptionId ) ; Util . throwIfNotOk ( resp ) ; } catch ( ApiException ex ) { throw new WorkspaceApiException ( "Cannot unsubscribe" , ex ) ; } }
Unsubscribe from the specified group of statistics .
21,274
public ApiResponse < ApiSuccessResponse > ackRecentMissedCallsWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = ackRecentMissedCallsValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , l...
Acknowledge missed calls Acknowledge missed calls in the list of recent targets .
21,275
public ApiResponse < Void > swaggerDocWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = swaggerDocValidateBeforeCall ( null , null ) ; return apiClient . execute ( call ) ; }
Returns API description in Swagger format Returns API description in Swagger format
21,276
public ApiResponse < Info > versionInfoWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = versionInfoValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < Info > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; }
Returns version information Returns version information
21,277
public ApiResponse < Void > notificationsWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = notificationsValidateBeforeCall ( null , null ) ; return apiClient . execute ( call ) ; }
CometD endpoint Subscribe to the CometD notification API .
21,278
public SearchResult < Target > search ( String searchTerm , TargetsSearchOptions options ) throws WorkspaceApiException { try { String types = null ; List < String > typesArray = null ; if ( options . getTypes ( ) != null ) { typesArray = new ArrayList < > ( 10 ) ; for ( TargetType targetType : options . getTypes ( ) )...
Search for targets by the specified search term .
21,279
public Target getTarget ( long id , TargetType type ) throws WorkspaceApiException { try { TargetsResponse resp = targetsApi . getTarget ( new BigDecimal ( id ) , type . getValue ( ) ) ; Util . throwIfNotOk ( resp . getStatus ( ) ) ; Target target = null ; if ( resp . getData ( ) != null ) { List < com . genesys . inte...
Get a specific target by type and ID . Targets can be agents agent groups queues route points skills and custom contacts .
21,280
public void deletePersonalFavorite ( Target target ) throws WorkspaceApiException { try { ApiSuccessResponse resp = targetsApi . deletePersonalFavorite ( String . valueOf ( target . getId ( ) ) , target . getType ( ) . getValue ( ) ) ; Util . throwIfNotOk ( resp ) ; } catch ( ApiException ex ) { throw new WorkspaceApiE...
Delete the target from the agent s personal favorites .
21,281
public SearchResult < Target > getPersonalFavorites ( int limit ) throws WorkspaceApiException { try { TargetsResponse resp = targetsApi . getPersonalFavorites ( limit > 0 ? new BigDecimal ( limit ) : null ) ; Util . throwIfNotOk ( resp . getStatus ( ) ) ; TargetsResponseData data = resp . getData ( ) ; int total = 0 ;...
Get the agent s personal favorites .
21,282
public void savePersonalFavorite ( Target target , String category ) throws WorkspaceApiException { TargetspersonalfavoritessaveData data = new TargetspersonalfavoritessaveData ( ) ; data . setCategory ( category ) ; data . setTarget ( toInformation ( target ) ) ; PersonalFavoriteData favData = new PersonalFavoriteData...
Save a target to the agent s personal favorites in the specified category .
21,283
public void ackRecentMissedCalls ( ) throws WorkspaceApiException { try { ApiSuccessResponse resp = targetsApi . ackRecentMissedCalls ( ) ; Util . throwIfNotOk ( resp ) ; } catch ( ApiException ex ) { throw new WorkspaceApiException ( "Cannot ack recent missed calls" , ex ) ; } }
Acknowledge missed calls in the list of recent targets .
21,284
public ApiResponse < InlineResponse200 > getCallsWithHttpInfo ( ) throws ApiException { com . squareup . okhttp . Call call = getCallsValidateBeforeCall ( null , null ) ; Type localVarReturnType = new TypeToken < InlineResponse200 > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; }
Get all calls Get all active calls for the current agent .
21,285
public ApiSuccessResponse switchToBargeIn ( String id , MonitoringScopeData monitoringScopeData ) throws ApiException { ApiResponse < ApiSuccessResponse > resp = switchToBargeInWithHttpInfo ( id , monitoringScopeData ) ; return resp . getData ( ) ; }
Switch to barge - in Switch to the barge - in monitoring mode . If the agent is currently on a call and T - Server is configured to allow barge - in the supervisor is immediately added to the call . Both the monitored agent and the customer are able to hear and speak with the supervisor . If the target agent is not on ...
21,286
public ApiSuccessResponse switchToCoaching ( String id , MonitoringScopeData monitoringScopeData ) throws ApiException { ApiResponse < ApiSuccessResponse > resp = switchToCoachingWithHttpInfo ( id , monitoringScopeData ) ; return resp . getData ( ) ; }
Switch to coach Switch to the coach monitoring mode . When coaching is enabled and the agent receives a call the supervisor is brought into the call . Only the agent can hear the supervisor .
21,287
private List < DependencyError > checkAllowedSection ( final Dependencies dependencies , final Package < DependsOn > allowedPkg , final ClassInfo classInfo ) { final List < DependencyError > errors = new ArrayList < DependencyError > ( ) ; final Iterator < String > it = classInfo . getImports ( ) . iterator ( ) ; while...
Checks the dependencies for a package from the allowed section .
21,288
private static List < DependencyError > checkForbiddenSection ( final Dependencies dependencies , final Package < NotDependsOn > forbiddenPkg , final ClassInfo classInfo ) { final List < DependencyError > errors = new ArrayList < DependencyError > ( ) ; final Iterator < String > it = classInfo . getImports ( ) . iterat...
Checks the dependencies for a package from the forbidden section .
21,289
private static String nameOnly ( final String filename ) { final int p = filename . lastIndexOf ( '.' ) ; if ( p == - 1 ) { return filename ; } return filename . substring ( 0 , p ) ; }
Returns the name of the file without path an extension .
21,290
private static List < DependencyError > checkAlwaysForbiddenSection ( final Dependencies dependencies , final ClassInfo classInfo ) { final List < DependencyError > errors = new ArrayList < DependencyError > ( ) ; final Iterator < String > importedPackages = classInfo . getImports ( ) . iterator ( ) ; while ( importedP...
Checks if any of the imports is listed in the alwaysForbidden section .
21,291
public final void analyze ( final File classesDir ) { final FileProcessor fileProcessor = new FileProcessor ( new FileHandler ( ) { public final FileHandlerResult handleFile ( final File classFile ) { if ( ! classFile . getName ( ) . endsWith ( ".class" ) ) { return FileHandlerResult . CONTINUE ; } try { final ClassInf...
Analyze the dependencies for all classes in the directory and it s sub directories .
21,292
static void analyzeDir ( final Set < Class < ? > > classes , final File baseDir , final File srcDir , final boolean recursive , final ClassFilter classFilter ) { final FileProcessor fileProcessor = new FileProcessor ( new FileHandler ( ) { public final FileHandlerResult handleFile ( final File file ) { if ( file . isDi...
Populates a list of classes from a given java source directory . All source files must have a . class file in the class path .
21,293
static EntityManager bind ( EntityManager entityManager ) { return entityManagerMap ( true ) . put ( entityManager . getEntityManagerFactory ( ) , entityManager ) ; }
Binds the given EntityManager to the current context for its EntityManagerFactory .
21,294
static EntityManager unbind ( EntityManagerFactory factory ) { final Map < EntityManagerFactory , EntityManager > entityManagerMap = entityManagerMap ( false ) ; EntityManager existing = null ; if ( entityManagerMap != null ) { existing = entityManagerMap . remove ( factory ) ; doCleanup ( ) ; } return existing ; }
Unbinds the EntityManager if any currently associated with the context for the given EntityManagerFactory .
21,295
static void unBindAll ( Consumer < EntityManager > function ) { final Map < EntityManagerFactory , EntityManager > entityManagerMap = entityManagerMap ( false ) ; if ( entityManagerMap != null ) { Iterator < EntityManager > iterator = entityManagerMap . values ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Ent...
Unbinds all EntityManagers regardless of EntityManagerFactory currently associated with the context .
21,296
EntityManager build ( EntityManagerContext entityManagerContext ) { ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; return ( EntityManager ) Proxy . newProxyInstance ( classLoader , new Class [ ] { EntityManager . class } , new SharedEntityManagerInvocationHandler ( entityManagerConte...
Create an EntityManager proxy for the given EntityManagerContext .
21,297
public static boolean hasAnnotation ( final List < AnnotationInstance > annotations , final String annotationClaszName ) { final DotName annotationName = DotName . createSimple ( annotationClaszName ) ; for ( final AnnotationInstance annotation : annotations ) { if ( annotation . name ( ) . equals ( annotationName ) ) ...
Verifies if a list of annotations contains a given one .
21,298
public static List < MethodInfo > findOverrideMethods ( final Index index , final MethodInfo method ) { return findOverrideMethods ( index , method . declaringClass ( ) , method , 0 ) ; }
Returns a list of all methods the given one overrides . Such methods can be found in interfaces and super classes .
21,299
public static void setPrivateField ( final Object obj , final String name , final Object value ) { try { final Field field = obj . getClass ( ) . getDeclaredField ( name ) ; field . setAccessible ( true ) ; field . set ( obj , value ) ; } catch ( final Exception ex ) { throw new RuntimeException ( "Couldn't set field '...
Sets a private field in an object by using reflection .