name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
graphhopper_Polygon_contains_rdh | /**
* Does the point in polygon check.
*
* @param lat
* Latitude of the point to be checked
* @param lon
* Longitude of the point to be checked
* @return true if point is inside polygon
*/
public boolean contains(double lat, double lon) {
return prepPolygon.co... | 3.26 |
graphhopper_MultiSourceElevationProvider_setBaseURL_rdh | /**
* For the MultiSourceElevationProvider you have to specify the base URL separated by a ';'.
* The first for cgiar, the second for gmted.
*/
@Override
public MultiSourceElevationProvider setBaseURL(String baseURL) {
String[] urls = baseURL.split(";");
if (urls.length != 2) {
throw new IllegalArgumentException... | 3.26 |
graphhopper_PathDetail_getValue_rdh | /**
*
* @return the value of this PathDetail. Can be null
*/
public Object getValue() {
return value;
} | 3.26 |
graphhopper_IntFloatBinaryHeap_percolateDownMinHeap_rdh | /**
* Percolates element down heap from the array position given by the index.
*/
final void percolateDownMinHeap(final int index) {
final int element = elements[index];
final float key = keys[index];
int hole = index;
while ((hole * 2) <= size) {
int child = hole * 2;
// if we have a ... | 3.26 |
graphhopper_Downloader_m0_rdh | /**
* This method initiates a connect call of the provided connection and returns the response
* stream. It only returns the error stream if it is available and readErrorStreamNoException is
* true otherwise it throws an IOException if an error happens. Furthermore it wraps the stream
* to decom... | 3.26 |
graphhopper_Distributions_logNormalDistribution_rdh | /**
* Use this function instead of Math.log(normalDistribution(sigma, x)) to avoid an
* arithmetic underflow for very small probabilities.
*/public static double logNormalDistribution(double sigma, double x) {
return Math.log(1.0 / (sqrt(2.0 *
PI) * sigma)) + ((-0.5) * pow(x / sigma, 2));
} | 3.26 |
graphhopper_Distributions_logExponentialDistribution_rdh | /**
* Use this function instead of Math.log(exponentialDistribution(beta, x)) to avoid an
* arithmetic underflow for very small probabilities.
*
* @param beta
* =1/lambda with lambda being the standard exponential distribution rate parameter
*/
static double logExponentialDistribution(double beta, double x) {
... | 3.26 |
graphhopper_Distributions_exponentialDistribution_rdh | /**
*
* @param beta
* =1/lambda with lambda being the standard exponential distribution rate parameter
*/
static double exponentialDistribution(double beta, double x)
{
return (1.0 / beta) * exp((-x) / beta);
} | 3.26 |
graphhopper_ConditionalExpressionVisitor_isValidIdentifier_rdh | // allow only methods and other identifiers (constants and encoded values)
boolean isValidIdentifier(String identifier) {
if (variableValidator.isValid(identifier)) {
if (!Character.isUpperCase(identifier.charAt(0)))
result.guessedVariables.add(identifier);
return true;}return false;
} | 3.26 |
graphhopper_GraphHopperConfig_putObject_rdh | // We can add explicit configuration properties to GraphHopperConfig (for example to allow lists or nested objects),
// everything else is stored in a HashMap
@JsonAnySetter
public GraphHopperConfig putObject(String key, Object value) {
map.putObject(key, value);
return this;
} | 3.26 |
graphhopper_LandmarkStorage_estimateMaxWeight_rdh | /**
* This method returns the maximum weight for the graph starting from the landmarks
*/
private double estimateMaxWeight(List<IntArrayList> graphComponents, EdgeFilter accessFilter) {
double maxWeight = 0;
int searchedSubnetworks = 0;
Random random = new Random(0);
// the maximum weight can only be ... | 3.26 |
graphhopper_LandmarkStorage_getToWeight_rdh | /**
*
* @return the weight from the specified node to the landmark (specified *as index*)
*/
int getToWeight(int landmarkIndex, int node) {
int res = ((int) (landmarkWeightDA.getShort(((((long) (node)) * LM_ROW_LENGTH) + (landmarkIndex * 4)) + TO_OFFSET))) & 0xffff;
if (res == SHORT_INFINITY)
return... | 3.26 |
graphhopper_LandmarkStorage_getWeighting_rdh | /**
* This method returns the weighting for which the landmarks are originally created
*/
public Weighting getWeighting() {
return weighting;} | 3.26 |
graphhopper_LandmarkStorage_setLandmarkSuggestions_rdh | /**
* This method forces the landmark preparation to skip the landmark search and uses the specified landmark list instead.
* Useful for manual tuning of larger areas to safe import time or improve quality.
*/
public LandmarkStorage setLandmarkSuggestions(List<LandmarkSuggestion> landmarkSuggestions) {
if (lan... | 3.26 |
graphhopper_LandmarkStorage_createLandmarks_rdh | /**
* This method calculates the landmarks and initial weightings to & from them.
*/
public void createLandmarks() {
if (isInitialized())
throw new IllegalStateException("Initialize the landmark storage only once!");
// fill 'from' and 'to' weights with maximum value
long maxBytes = ((long) (... | 3.26 |
graphhopper_LandmarkStorage_getLandmarksAsGeoJSON_rdh | /**
*
* @return the calculated landmarks as GeoJSON string.
*/
String
getLandmarksAsGeoJSON() {
String str = "";
for (int subnetwork = 1; subnetwork < f0.size(); subnetwork++) {
int[] lmArray ... | 3.26 |
graphhopper_LandmarkStorage_setWeight_rdh | /**
*
* @return false if the value capacity was reached and instead of the real value the SHORT_MAX was stored.
*/
final boolean setWeight(long pointer, double value) {
double tmpVal = value / factor;
if (tmpVal > Integer.MAX_VALUE)
throw new UnsupportedOperationException((((("Cannot store infinity... | 3.26 |
graphhopper_LandmarkStorage_getSubnetworksWithLandmarks_rdh | /**
*
* @return the number of subnetworks that have landmarks
*/ public int getSubnetworksWithLandmarks() {
return f0.size();
} | 3.26 |
graphhopper_LandmarkStorage_setAreaIndex_rdh | /**
* This method specifies the polygons which should be used to split the world wide area to improve performance and
* quality in this scenario.
*/
public void setAreaIndex(AreaIndex<SplitArea>
areaIndex) {
this.areaIndex = areaIndex; } | 3.26 |
graphhopper_LandmarkStorage_setLMSelectionWeighting_rdh | /**
* This weighting is used for the selection heuristic and is per default not the weighting specified in the constructor.
* The special weighting leads to a much better distribution of the landmarks and results in better response times.
*/
public void setLMSelectionWeighting(Weighting lmSelectionWeighting) {
... | 3.26 |
graphhopper_LandmarkStorage_setLogDetails_rdh | /**
* By default do not log many details.
*/
public void setLogDetails(boolean logDetails) {
this.logDetails
= logDetails;
} | 3.26 |
graphhopper_LandmarkStorage_createLandmarksForSubnetwork_rdh | /**
* This method creates landmarks for the specified subnetwork (integer list)
*
* @return landmark mapping
*/
private boolean createLandmarksForSubnetwork(final int startNode, final byte[]
subnetworks, EdgeFilter accessFilter) {
final int subnetworkId = f0.size();
int[] tmpLandmarkNodeIds = new in... | 3.26 |
graphhopper_LandmarkStorage_m1_rdh | /**
* For testing only
*/
DataAccess m1() {
return landmarkWeightDA;
} | 3.26 |
graphhopper_LandmarkStorage_chooseActiveLandmarks_rdh | // From all available landmarks pick just a few active ones
boolean chooseActiveLandmarks(int fromNode, int toNode, int[] activeLandmarkIndices, boolean reverse) {
if ((fromNode < 0) || (toNode < 0))
throw new IllegalStateException(((("from "... | 3.26 |
graphhopper_LandmarkStorage_findBorderEdgeIds_rdh | /**
* This method makes edges crossing the specified border inaccessible to split a bigger area into smaller subnetworks.
* This is important for the world wide use case to limit the maximum distance and also to detect unreasonable routes faster.
*/
protected IntHashSet findBorderEdgeIds(AreaIndex<SplitArea> areaInd... | 3.26 |
graphhopper_LandmarkStorage_setMaximumWeight_rdh | /**
* Specify the maximum possible value for your used area. With this maximum weight value you can influence the storage
* precision for your weights that help A* finding its way to the goal. The same value is used for all subnetworks.
* Note, if you pick this value too big then too similar weights are stored
* (s... | 3.26 |
graphhopper_LandmarkStorage_getMinimumNodes_rdh | /**
*
* @see #setMinimumNodes(int)
*/
public int getMinimumNodes() {
return minimumNodes;
} | 3.26 |
graphhopper_TranslationMap_postImportHook_rdh | /**
* This method does some checks and fills missing translation from en
*/
private void postImportHook() {
Map<String, String> enMap = get("en").asMap();
StringBuilder sb = new StringBuilder();
for (Translation tr :
translations.values()) {
Map<String, Stri... | 3.26 |
graphhopper_TranslationMap_get_rdh | /**
* Returns the Translation object for the specified locale and returns null if not found.
*/
public Translation get(String locale) {
locale = locale.replace("-", "_");
Translation tr = translations.get(locale);
if (locale.contains("_") && (tr == null))
tr = translations.get(locale.substring(0... | 3.26 |
graphhopper_TranslationMap_getWithFallBack_rdh | /**
* Returns the Translation object for the specified locale and falls back to English if the
* locale was not found.
*/
public Translation getWithFallBack(Locale locale) {
Translation tr = get(locale.toString());
if (tr == null) {
tr = get(locale.getLanguage());
if (tr == null)
... | 3.26 |
graphhopper_TranslationMap_doImport_rdh | /**
* This loads the translation files from classpath.
*/
public TranslationMap doImport() {
try {
for (String locale : LOCALES) {TranslationHashMap trMap = new TranslationHashMap(getLocale(locale));
trMap.doImport(TranslationMap.class.getResourceAsStream(locale + ".txt"));
add(t... | 3.26 |
graphhopper_ShallowImmutablePointList_ensureNode_rdh | /* Immutable forbidden part */
@Override
public void ensureNode(int nodeId) {
throw new UnsupportedOperationException(IMMUTABLE_ERR);
} | 3.26 |
graphhopper_ShallowImmutablePointList_is3D_rdh | /* Wrapping Part */
@Override
public boolean is3D() {
return wrappedPointList.is3D();
} | 3.26 |
graphhopper_GHMatrixAbstractRequester_fillResponseFromJson_rdh | /**
*
* @param failFast
* If false weights/distances/times that are null are interpreted as disconnected points and are
* thus set to their respective maximum values. Furthermore, the indices of the disconnected points
* are added to {@link MatrixResponse#getDisconnectedPoints()} and the indices of the point... | 3.26 |
graphhopper_State_getIncomingVirtualEdge_rdh | /**
* Returns the virtual edge that should be used by incoming paths.
*
* @throws IllegalStateException
* if this State is not directed.
*/
public EdgeIteratorState getIncomingVirtualEdge() {
if (!isDirected) {
throw new IllegalStateException("This method may only be called for directed GPXExtension... | 3.26 |
graphhopper_State_getOutgoingVirtualEdge_rdh | /**
* Returns the virtual edge that should be used by outgoing paths.
*
* @throws IllegalStateException
* if this State is not directed.
*/
public EdgeIteratorState getOutgoingVirtualEdge() {
if (!isDirected) {
throw new IllegalStateException("This method may only be called for directed GPXExtensio... | 3.26 |
graphhopper_DAType_isInMemory_rdh | /**
*
* @return true if data resides in the JVM heap.
*/
public boolean isInMemory() {
return memRef == MemRef.HEAP;
} | 3.26 |
graphhopper_LocationIndex_query_rdh | /**
* This method explores the LocationIndex with the specified Visitor. It visits only the stored edges (and only once)
* and limited by the queryBBox. Also (a few) more edges slightly outside of queryBBox could be
* returned that you can avoid via doing an explicit BBox check of the coordinates.
*/
default void
q... | 3.26 |
graphhopper_GHSortedCollection_pollKey_rdh | /**
*
* @return removes the smallest entry (key and value) from this collection
*/
public int pollKey() {
size--;
if (size < 0) {throw new IllegalStateException("collection is already empty!?");
}
Entry<Integer, GHIntHashSet> e = map.firstEntry();
GHIntHashSet set = e.getValue();
if (set.isE... | 3.26 |
graphhopper_LuxembourgCountryRule_getToll_rdh | /**
* Defines the default rules for Luxembourgish roads
*
* @author Thomas Butz
*/public class LuxembourgCountryRule implements CountryRule {
@Override
public Toll getToll(ReaderWay readerWay, Toll currentToll) {
if (currentToll != Toll.MISSING) {
return currentToll;}
RoadClass r... | 3.26 |
graphhopper_EdgeChangeBuilder_build_rdh | /**
* Builds a mapping between real node ids and the set of changes for their adjacent edges.
*
* @param edgeChangesAtRealNodes
* output parameter, you need to pass an empty & modifiable map and the results will
* be added to it
*/
static void build(IntArrayList closestEdges, List<VirtualEdgeIteratorState> vi... | 3.26 |
graphhopper_EdgeChangeBuilder_addVirtualEdges_rdh | /**
* Adds the virtual edges adjacent to the real tower nodes
*/
private void addVirtualEdges(boolean base, int node, int virtNode) {
QueryOverlay.EdgeChanges edgeChanges = edgeChangesAtRealNodes.get(node);
if (edgeChanges == null) {
edgeChanges = new QueryOverlay.EdgeChanges(2, 2);
edgeChange... | 3.26 |
graphhopper_PMap_m0_rdh | /**
* Reads a PMap from a string array consisting of key=value pairs
*/
public static PMap m0(String[] args) {
PMap map = new PMap();
for (String arg : args) {
int index = arg.indexOf("=");
if (index <= 0) {
c... | 3.26 |
graphhopper_MapMatching_setMeasurementErrorSigma_rdh | /**
* Standard deviation of the normal distribution [m] used for modeling the
* GPS error.
*/
public void setMeasurementErrorSigma(double measurementErrorSigma) {
this.measurementErrorSigma = measurementErrorSigma;
} | 3.26 |
graphhopper_MapMatching_createTimeSteps_rdh | /**
* Creates TimeSteps with candidates for the GPX entries but does not create emission or
* transition probabilities. Creates directed candidates for virtual nodes and undirected
* candidates for real nodes.
*/
private List<ObservationWithCandidateStates> createTimeSteps(List<Observation> filteredObservations, L... | 3.26 |
graphhopper_LMPreparationHandler_prepare_rdh | /**
* Prepares the landmark data for all given configs
*/
public List<PrepareLandmarks> prepare(List<LMConfig> lmConfigs, BaseGraph baseGraph, EncodingManager encodingManager, StorableProperties properties, LocationIndex locationIndex, final
boolean closeEarly) {
List<PrepareLandmarks> preparations = createPrepar... | 3.26 |
graphhopper_LMPreparationHandler_setLMProfiles_rdh | /**
* Enables the use of landmarks to reduce query times.
*/
public LMPreparationHandler setLMProfiles(Collection<LMProfile> lmProfiles) {
this.lmProfiles.clear();
this.f0.clear();
for (LMProfile profile : lmProfiles) {
if (profile.usesOtherPreparation())
continue;
f0.put(pro... | 3.26 |
graphhopper_LMPreparationHandler_createPreparations_rdh | /**
* This method creates the landmark storages ready for landmark creation.
*/
List<PrepareLandmarks> createPreparations(List<LMConfig> lmConfigs, BaseGraph graph, EncodedValueLookup encodedValueLookup, LocationIndex locationIndex) {
LOGGER.info("Creating LM preparations, {}", getMemInfo());
... | 3.26 |
graphhopper_AbstractDataAccess_writeHeader_rdh | /**
* Writes some internal data into the beginning of the specified file.
*/
protected void writeHeader(RandomAccessFile file, long length, int segmentSize) throws IOException {
file.seek(0);
file.writeUTF("GH");file.writeLong(length);
file.writeInt(segmentSize);
for (int i = 0; i < header.length; i++... | 3.26 |
graphhopper_RamerDouglasPeucker_subSimplify_rdh | // keep the points of fromIndex and lastIndex
int subSimplify(PointList points, int fromIndex, int lastIndex) {
if ((lastIndex - fromIndex) < 2) { return 0;
}
int indexWithMaxDist = -1;double maxDist = -1;
double elevationFactor = maxDistance / elevationMaxDistance;
double firstLat = points.get... | 3.26 |
graphhopper_RamerDouglasPeucker_simplify_rdh | /**
* Simplifies a part of the <code>points</code>. The <code>fromIndex</code> and <code>lastIndex</code>
* are guaranteed to be kept.
*
* @param points
* The PointList to simplify
* @param fromIndex
* Start index to simplify, should be <= <code>lastIndex</code>
* @param lastIndex
* Simplify up to this i... | 3.26 |
graphhopper_RamerDouglasPeucker_setElevationMaxDistance_rdh | /**
* maximum elevation distance of discrepancy (from the normal way) in meters
*/
public RamerDouglasPeucker setElevationMaxDistance(double dist) {
this.elevationMaxDistance = dist;
return this;
} | 3.26 |
graphhopper_RamerDouglasPeucker_removeNaN_rdh | /**
* Fills all entries of the point list that are NaN with the subsequent values (and therefore shortens the list)
*/
static void removeNaN(PointList pointList) {
int curr = 0;
for (int i = 0; i < pointList.size(); i++) {
if (!Double.isNaN(pointList.getLat(i))) {
pointList.set(curr, poin... | 3.26 |
graphhopper_RamerDouglasPeucker_setMaxDistance_rdh | /**
* maximum distance of discrepancy (from the normal way) in meter
*/
public RamerDouglasPeucker setMaxDistance(double dist) {
this.normedMaxDist = calc.calcNormalizedDist(dist);
this.maxDistance = dist;
return this;
} | 3.26 |
graphhopper_Service_hasAnyService_rdh | /**
*
* @return whether this Service is ever active at all, either from calendar or calendar_dates.
*/
public boolean hasAnyService() {
// Look for any service defined in calendar (on days of the week).
boolean hasAnyService = (f0 != null) && (((((((f0.monday == 1) || (f0.tuesday == 1)) || (f0.wednesday == ... | 3.26 |
graphhopper_Service_checkOverlap_rdh | /**
* Checks for overlapping days of week between two service calendars
*
* @param s1
* @param s2
* @return true if both calendars simultaneously operate on at least one day of the week
*/
public static boolean checkOverlap(Service s1, Service s2) {
if ((s1.f0 == null) || (s2.f0 == null)) {
return f... | 3.26 |
graphhopper_Service_activeOn_rdh | /**
* Is this service active on the specified date?
*/
public boolean activeOn(LocalDate date) {
// first check for exceptions
CalendarDate exception = calendar_dates.get(date);
if (exception != null)
return exception.exception_type == 1;
else if (f0
== null)
return false;else {
... | 3.26 |
graphhopper_Service_removeDays_rdh | /**
*
* @param service_id
* the service_id to assign to the newly created copy.
* @param daysToRemove
* the days of the week on which to deactivate service in the copy.
* @return a copy of this Service with any service on the specified days of the week deactivated.
*/public Service removeDays(String service_... | 3.26 |
benchmark_PravegaBenchmarkTransactionProducer_probeRequested_rdh | /**
* Indicates if producer probe had been requested by OpenMessaging benchmark.
*
* @param key
* - key provided to the probe.
* @return true in case requested event had been created in context of producer probe.
*/
private boolean probeRequested(Optional<String> key) {
// For the expected key, see: LocalWorker... | 3.26 |
benchmark_ListPartition_partitionList_rdh | /**
* partition a list to specified size.
*
* @param originList
* @param size
* @param <T>
* @return the partitioned list
*/
public static <T> List<List<T>> partitionList(List<T> originList, int size) {
List<List<T>> resultList = new ArrayList<>();
if (((null == originList) || (0 == originList.size()))... | 3.26 |
open-banking-gateway_PsuAuthService_tryAuthenticateUser_rdh | /**
* Try to authenticate PSU give login and password
*
* @param login
* PSU login
* @param password
* PSU password
* @return PSU entity if user was successfully authenticated
* @throws PsuWrongCredentials
* Exception indicating user has provided wrong name or password.
*/
@Transactional
public Psu tryA... | 3.26 |
open-banking-gateway_PsuAuthService_m0_rdh | /**
* Create new PSU if it does not exists yet.
*
* @param login
* PSU login
* @param password
* PSU password
* @return New PSU
*/
@Transactional
public Psu m0(String login, String password) {
Optional<Psu> psu = psuRepository.findByLogin(login);
if (psu.isPresent()) {
throw new PsuRegisterE... | 3.26 |
open-banking-gateway_CreateConsentOrPaymentPossibleErrorHandler_tryCreateAndHandleErrors_rdh | /**
* Swallows retryable (like wrong IBAN) consent initiation exceptions.
*
* @param tryCreate
* Consent/payment creation function to call
*/public <T> T tryCreateAndHandleErrors(DelegateExecution execution, Supplier<T> tryCreate) {
try {
return tryCreate.get();
} catch (ErrorResponseException ex... | 3.26 |
open-banking-gateway_PsuSecureStorage_registerPsu_rdh | /**
* Registers PSU in Datasafe
*
* @param psu
* PSU data
* @param password
* PSU KeyStore/Datasafe password.
*/
public void registerPsu(Psu psu, Supplier<char[]> password) {
this.userProfile().createDocumentKeystore(psu.getUserIdAuth(password), config.defaultPrivateTemplate(psu.getUserIdAuth(password)).... | 3.26 |
open-banking-gateway_PsuSecureStorage_getOrCreateKeyFromPrivateForAspsp_rdh | /**
* Gets or generates key from for PSU to ASPSP consent protection
*
* @param password
* Key protection password
* @param session
* Authorization session for current user
* @param storePublicKeyIfNeeded
* If public key needs to be stored
* @return Public and Priv... | 3.26 |
open-banking-gateway_FacadeTransientDataConfig_facadeCacheBuilder_rdh | /**
* Facade encryption keys cache configuration.
*
* @param expireAfterWrite
* Evict encryption key this time after write
* @return Key cache.
*/
@Bean(FACADE_CACHE_BUILDER)
CacheBuilder facadeCacheBuilder(@Value(("${" + FACADE_CONFIG_PREFIX) +
".expirable.expire-after-write} | 3.26 |
open-banking-gateway_HbciRestorePreValidationContext_lastRedirectionTarget_rdh | // FIXME SerializerUtil does not support nestedness
private LastRedirectionTarget lastRedirectionTarget(BaseContext current) {
if (null == current.getLastRedirection()) {
return null;
}
LastRedirectionTarget target = current.getLastRedirection();target.setRequestScoped(current.getRequestScoped());
... | 3.26 |
open-banking-gateway_HbciAuthorizationPossibleErrorHandler_handlePossibleAuthorizationError_rdh | /**
* Swallows retryable (like wrong password) authorization exceptions.
*
* @param tryAuthorize
* Authorization function to call
* @param onFail
* Fallback function to call if retryable exception occurred.
*/
public void handlePossibleAuthorizationError(Runnable tryAuthorize, Consumer<MultibankingException>... | 3.26 |
open-banking-gateway_AuthSessionHandler_reuseAuthSessionAndEnhanceResult_rdh | /**
* Continues already existing authorization session associated with the request.
*
* @param authSession
* Authorization session to continue
* @param sessionKey
* Encryption key for the authorization session
* @param context
* Service context for the request
* @param result
* Protocol response that ... | 3.26 |
open-banking-gateway_AuthSessionHandler_createNewAuthSessionAndEnhanceResult_rdh | /**
* Creates new authorization session associated with the request.
*
* @param request
* Request to associate session with.
* @param sessionKey
* Authorization session encryption key.
* @param context
* Service context for the request
* @param result
* Protocol response that required to open the sess... | 3.26 |
open-banking-gateway_QueryHeadersMapperTemplate_forExecution_rdh | /**
* Converts context object into object that can be used for ASPSP API call.
*
* @param context
* Context to convert
* @return Object that can be used with {@code Xs2aAdapter} to perform ASPSP API calls
*/
public ValidatedQueryHeaders<Q, H> forExecution(C context) {
return new ValidatedQueryHeaders<>(... | 3.26 |
open-banking-gateway_FintechAuthenticator_authenticateOrCreateFintech_rdh | /**
* Authenticates or creates new FinTech if it is missing in DB.
*
* @param request
* FinTechs' request
* @param session
* Currently served service session
* @return New or existing FinTech
*/
@Transactional public Fintech authenticateOrCreateFintech(FacadeServiceableRequest request, ServiceSession sessio... | 3.26 |
open-banking-gateway_PathQueryHeadersMapperTemplate_forExecution_rdh | /**
* Converts context object into object that can be used for ASPSP API call.
*
* @param context
* Context to convert
* @return Object that can be used with {@code Xs2aAdapter} to perform ASPSP API calls
*/
public ValidatedPathQueryHeaders<P, Q, H> forExecution(C context) {
return new ValidatedPathQueryHe... | 3.26 |
open-banking-gateway_FintechConsentSpecSecureStorage_fromInboxForAuth_rdh | /**
* Get data from FinTechs' inbox associated with the FinTech user.
*
* @param authSession
* Authorization session associated with this user
* @param password
* FinTech user password
* @return FinTechs' users' keys to access consent, spec. etc.
*/
@SneakyThrows
public FinTechUserInboxData fromInboxForAu... | 3.26 |
open-banking-gateway_FintechConsentSpecSecureStorage_registerFintechUser_rdh | /**
* Registers FinTech user
*
* @param user
* User entity
* @param password
* Datasafe password for the user
*/
public void registerFintechUser(FintechUser
user, Supplier<char[]> password) {
this.userProfile().createDocumentKeystore(user.getUserIdAuth(password), config.defaultPrivateTemplate(user.getU... | 3.26 |
open-banking-gateway_FintechConsentSpecSecureStorage_toInboxForAuth_rdh | /**
* Sends FinTech user keys to FinTech public key storage.
*
* @param authSession
* Authorization session associated with this user
* @param data
* FinTech users' private keys and other
*/
@SneakyThrows
public void toInboxForAuth(AuthSession authSession, FinTechUserInboxData data) {
try (OutputStream ... | 3.26 |
open-banking-gateway_ProtocolFacingConsentImpl_getConsentContext_rdh | /**
* Description of the parameters associated with this consent, i.e. list of IBANs that this consent applies to.
*/
@Override
public String getConsentContext() {
return consent.getContext(encryptionService);
} | 3.26 |
open-banking-gateway_ProtocolFacingConsentImpl_getConsentCache_rdh | /**
* Returns cached data (i.e. transaction list) related to the consent.
*/
@Override
public String getConsentCache() {
return consent.getCache(encryptionService);} | 3.26 |
open-banking-gateway_ConsentAccess_getFirstByCurrentSession_rdh | /**
* Available consent for current session execution with throwing exception
*/
default ProtocolFacingConsent getFirstByCurrentSession() {
List<ProtocolFacingConsent> consents = findByCurrentServiceSessionOrderByModifiedDesc();
if (consents.isEmpty()) {
throw new IllegalStateException("Context not fo... | 3.26 |
open-banking-gateway_FacadeResult_m0_rdh | /**
* Response body
*/
default T m0() {
return null;
} | 3.26 |
open-banking-gateway_ValidatedExecution_execute_rdh | /**
* Entrypoint for Flowable BPMN to call the service.
*/
@Override
@Transactional(noRollbackFor = BpmnError.class)
public void execute(DelegateExecution execution) {
@SuppressWarnings("unchecked")
T context = ((T) (ContextUtil.getContext(execution, BaseContext.class)));
logResolver.log("execute: execut... | 3.26 |
open-banking-gateway_FacadeService_execute_rdh | /**
* Execute the request by passing it to protocol, or throw if protocol is missing.
*
* @param request
* Request to execute
* @return Result of request execution
*/
public CompletableFuture<FacadeResult<RESULT>> execute(REQUEST request) {
ProtocolWithCtx<ACTION, REQUEST> protocolWithCtx = createContextAnd... | 3.26 |
open-banking-gateway_Result_m0_rdh | /**
* Non-sensitive information that can be persisted with authorization session and read on subsequent requests.
* For example some internal ID, or protocol-encrypted data.
*/
default String m0() {
return null;
} | 3.26 |
open-banking-gateway_EncryptionKeySerde_readKey_rdh | /**
* Read public-private key pair from InputStream
*
* @param is
* InputStream to read key from
* @return Read key pair
*/
@SneakyThrows
public PubAndPrivKey readKey(InputStream is) {
PubAndPrivKeyContainer
container = mapper.readValue(is, EncryptionKeySerde.PubAndPrivKeyContainer.class);
if (!PK... | 3.26 |
open-banking-gateway_EncryptionKeySerde_asString_rdh | /**
* Convert symmetric key with initialization vector to string.
*
* @param secretKeyWithIv
* Symmetric Key + IV
* @return Serialized key
*/
@SneakyThrows
public String asString(SecretKeyWithIv secretKeyWithIv) {
return mapper.writeValueAsString(new SecretKeyWithIvContainer(secretKeyWithIv));
} | 3.26 |
open-banking-gateway_EncryptionKeySerde_writeKey_rdh | /**
* Write public-private key pair into OutputStream
*
* @param publicKey
* Public key of pair
* @param privKey
* Private key of pair
* @param os
* Output stream to write to
*/
@SneakyThrows
public void writeKey(PublicKey publicKey, PrivateKey privKey, OutputStream os) {
// Mapper may choose to clos... | 3.26 |
open-banking-gateway_EncryptionKeySerde_read_rdh | /**
* Read symmetric key with initialization vector from input stream.
*
* @param is
* Stream with key
* @return Read key
*/
@SneakyThrows
public SecretKeyWithIv read(InputStream is) {
SecretKeyWithIvContainer container = mapper.readValue(is, EncryptionKeySerde.SecretKeyWithIvContainer.class);
return ne... | 3.26 |
open-banking-gateway_EncryptionKeySerde_write_rdh | /**
* Write symmetric key with initialization vector to output stream.
*
* @param value
* Key to write
* @param os
* Output stream to write to
*/
@SneakyThrows
public void write(SecretKeyWithIv value, OutputStream os) {
// Mapper may choose to close the stream if using stream interface, we don't want thi... | 3.26 |
open-banking-gateway_EncryptionKeySerde_fromString_rdh | /**
* Convert string to symmetric key with initialization vector.
*
* @param fromString
* String to buld key from
* @return Deserialized key
*/@SneakyThrows
public SecretKeyWithIv fromString(String fromString) {
SecretKeyWithIvContainer container = mapper.readValue(fromString, EncryptionKeySerde.SecretKeyWi... | 3.26 |
open-banking-gateway_WebDriverBasedPaymentInitiation_sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack_rdh | /* Caused by FIXME https://github.com/adorsys/XS2A-Sandbox/issues/42, should be sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only */
public SELF sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack(WebDriver
driver) {... | 3.26 |
open-banking-gateway_WebDriverBasedPaymentInitiation_sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only_rdh | // Sending cookie with last request as it doesn't exist in browser for API tests
// null for cookieDomain is the valid value for localhost tests. This works correctly for localhost.
public SELF sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only(WebDriver driver) {
acc.sandbox_anton... | 3.26 |
open-banking-gateway_ConsentAccessFactory_consentForFintech_rdh | /**
* Consent for Fintech (executed on i.e. ListAccounts).
*
* @param fintech
* FinTech that wants to access consents'
* @param aspsp
* ASPSP(bank) that grants consent
* @param session
* Service session for this consent
* @param fintechPassword
* FinTech Keystore protection password
* @return New con... | 3.26 |
open-banking-gateway_ConsentAccessFactory_consentForAnonymousPsu_rdh | /**
* Consent access for Anonymous PSU (does not require login to OBG)-ASPSP tuple.
*
* @param aspsp
* ASPSP(bank) that grants consent
* @param session
* Service session for this consent
* @return New consent access template
*/
public ConsentAccess consentForAnonymousPsu(Fintech fintech, Bank aspsp, Service... | 3.26 |
open-banking-gateway_ConsentAccessFactory_consentForPsuAndAspsp_rdh | /**
* Consent access for PSU-ASPSP tuple.
*
* @param psu
* Fintech user/PSU to grant consent for
* @param aspsp
* ASPSP(bank) that grants consent
* @param session
* Service session for this consent
* @return New consent access template
*/
public ConsentAccess consentForPsuAndAspsp(Psu psu, Bank aspsp, S... | 3.26 |
open-banking-gateway_ProtocolResultHandler_handleResult_rdh | /**
* Handles the result from protocol for the {@code FacadeService} to pass it to API.
* This class must ensure that it is separate transaction - so it won't join any other as is used with
* CompletableFuture.
*/
@Transactional(propagation = Propagation.REQUIRES_NEW)
public <RESULT, REQUEST extends
FacadeServiceab... | 3.26 |
open-banking-gateway_ConsentAccessUtil_getProtocolFacingConsent_rdh | /**
* Retrieves exactly one consent out of available, throws if more area available.
*
* @param consents
* Consents
* @return 1st element of the collection.
*/
@NotNull
public Optional<ProtocolFacingConsent> getProtocolFacingConsent(Collection<ProtocolFacingConsent> consents) {
if (consents.isEmpty()) {
... | 3.26 |
open-banking-gateway_WebDriverBasedAccountInformation_sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only_rdh | // Sending cookie with last request as it doesn't exist in browser for API tests
// null for cookieDomain is the valid value for localhost tests. This works correctly for localhost.
public SELF sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only(WebDriver driver, String authSessionCoo... | 3.26 |
open-banking-gateway_WebDriverBasedAccountInformation_sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack_rdh | /* Caused by FIXME https://github.com/adorsys/XS2A-Sandbox/issues/42, should be sandbox_anton_brueckner_clicks_redirect_back_to_tpp_button_api_localhost_cookie_only */
public SELF sandbox_anton_brueckner_imitates_click_redirect_back_to_tpp_button_api_localhost_cookie_only_with_oauth2_integrated_hack(WebDriver driver,... | 3.26 |
open-banking-gateway_PathHeadersMapperTemplate_forExecution_rdh | /**
* Converts context object into object that can be used for ASPSP API call.
*
* @param context
* Context to convert
* @return Object that can be used with {@code Xs2aAdapter} to perform ASPSP API calls
*/
public ValidatedPathHeaders<P, H> forExecution(C context) {
return new ValidatedPathHeaders<>(toPath... | 3.26 |
open-banking-gateway_ProcessEventHandlerRegistrar_addHandler_rdh | /**
* Adds handler for BPMN event.
*
* @param processId
* BPMN process id event source. BPMN can have multiple executions of same process, this is
* the id of the process that identifies the execution uniquely.
* @param mapper
* Mapper to transform internal event that is sent by BPMN to higher-level result... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.