id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
105,100
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/ExpectSteps.java
ExpectSteps.presenceOfNbElementsLocatedBy
public static ExpectedCondition<List<WebElement>> presenceOfNbElementsLocatedBy(final By locator, final int nb) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { final List<WebElement> elements = driver.findEl...
java
public static ExpectedCondition<List<WebElement>> presenceOfNbElementsLocatedBy(final By locator, final int nb) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { final List<WebElement> elements = driver.findEl...
[ "public", "static", "ExpectedCondition", "<", "List", "<", "WebElement", ">", ">", "presenceOfNbElementsLocatedBy", "(", "final", "By", "locator", ",", "final", "int", "nb", ")", "{", "return", "new", "ExpectedCondition", "<", "List", "<", "WebElement", ">", "...
An expectation for checking that nb elements that match the locator are present on the web page. @param locator Locator of element @param nb Expected number of elements @return the list of WebElements once they are located
[ "An", "expectation", "for", "checking", "that", "nb", "elements", "that", "match", "the", "locator", "are", "present", "on", "the", "web", "page", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/ExpectSteps.java#L122-L130
105,101
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/ExpectSteps.java
ExpectSteps.visibilityOfNbElementsLocatedBy
public static ExpectedCondition<List<WebElement>> visibilityOfNbElementsLocatedBy(final By locator, final int nb) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { int nbElementIsDisplayed = 0; ...
java
public static ExpectedCondition<List<WebElement>> visibilityOfNbElementsLocatedBy(final By locator, final int nb) { return new ExpectedCondition<List<WebElement>>() { @Override public List<WebElement> apply(WebDriver driver) { int nbElementIsDisplayed = 0; ...
[ "public", "static", "ExpectedCondition", "<", "List", "<", "WebElement", ">", ">", "visibilityOfNbElementsLocatedBy", "(", "final", "By", "locator", ",", "final", "int", "nb", ")", "{", "return", "new", "ExpectedCondition", "<", "List", "<", "WebElement", ">", ...
An expectation for checking that nb elements present on the web page that match the locator are visible. Visibility means that the elements are not only displayed but also have a height and width that is greater than 0. @param locator Locator of element @param nb Expected number of elements @return the list of WebElem...
[ "An", "expectation", "for", "checking", "that", "nb", "elements", "present", "on", "the", "web", "page", "that", "match", "the", "locator", "are", "visible", ".", "Visibility", "means", "that", "the", "elements", "are", "not", "only", "displayed", "but", "al...
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/ExpectSteps.java#L143-L157
105,102
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/ExpectSteps.java
ExpectSteps.waitForLoad
public static ExpectedCondition<Boolean> waitForLoad() { return new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver driver) { return ((JavascriptExecutor) driver).executeScript("return document.readyState").equals("complete"); } ...
java
public static ExpectedCondition<Boolean> waitForLoad() { return new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver driver) { return ((JavascriptExecutor) driver).executeScript("return document.readyState").equals("complete"); } ...
[ "public", "static", "ExpectedCondition", "<", "Boolean", ">", "waitForLoad", "(", ")", "{", "return", "new", "ExpectedCondition", "<", "Boolean", ">", "(", ")", "{", "@", "Override", "public", "Boolean", "apply", "(", "WebDriver", "driver", ")", "{", "return...
Expects that the target page is completely loaded. @return true or false
[ "Expects", "that", "the", "target", "page", "is", "completely", "loaded", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/ExpectSteps.java#L164-L171
105,103
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Messages.java
Messages.format
public static String format(String templateMessage, Object... args) throws TechnicalException { if (null != templateMessage && countWildcardsOccurrences(templateMessage, "%s") == args.length) { try { return String.format(templateMessage, args); } catch (final Exceptio...
java
public static String format(String templateMessage, Object... args) throws TechnicalException { if (null != templateMessage && countWildcardsOccurrences(templateMessage, "%s") == args.length) { try { return String.format(templateMessage, args); } catch (final Exceptio...
[ "public", "static", "String", "format", "(", "String", "templateMessage", ",", "Object", "...", "args", ")", "throws", "TechnicalException", "{", "if", "(", "null", "!=", "templateMessage", "&&", "countWildcardsOccurrences", "(", "templateMessage", ",", "\"%s\"", ...
Format given message with provided arguments @param templateMessage Message to display before formatting @param args Arguments @return a String containing the message well formatted. @throws TechnicalException if data input is wrong.
[ "Format", "given", "message", "with", "provided", "arguments" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Messages.java#L111-L121
105,104
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Messages.java
Messages.getMessage
public static String getMessage(String key, String bundle) { if (!messagesBundles.containsKey(bundle)) { if (Context.getLocale() == null) { messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Locale.getDefault())); } else { messages...
java
public static String getMessage(String key, String bundle) { if (!messagesBundles.containsKey(bundle)) { if (Context.getLocale() == null) { messagesBundles.put(bundle, ResourceBundle.getBundle("i18n/" + bundle, Locale.getDefault())); } else { messages...
[ "public", "static", "String", "getMessage", "(", "String", "key", ",", "String", "bundle", ")", "{", "if", "(", "!", "messagesBundles", ".", "containsKey", "(", "bundle", ")", ")", "{", "if", "(", "Context", ".", "getLocale", "(", ")", "==", "null", ")...
Gets a message by key using the resources bundle given in parameters. @param key The key of the message to retrieve. @param bundle The resource bundle to use. @return The String content of the message.
[ "Gets", "a", "message", "by", "key", "using", "the", "resources", "bundle", "given", "in", "parameters", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Messages.java#L145-L155
105,105
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Messages.java
Messages.countWildcardsOccurrences
private static int countWildcardsOccurrences(String templateMessage, String occurrence) { if (templateMessage != null && occurrence != null) { final Pattern pattern = Pattern.compile(occurrence); final Matcher matcher = pattern.matcher(templateMessage); int count = 0; ...
java
private static int countWildcardsOccurrences(String templateMessage, String occurrence) { if (templateMessage != null && occurrence != null) { final Pattern pattern = Pattern.compile(occurrence); final Matcher matcher = pattern.matcher(templateMessage); int count = 0; ...
[ "private", "static", "int", "countWildcardsOccurrences", "(", "String", "templateMessage", ",", "String", "occurrence", ")", "{", "if", "(", "templateMessage", "!=", "null", "&&", "occurrence", "!=", "null", ")", "{", "final", "Pattern", "pattern", "=", "Pattern...
Count the number of occurrences of a given wildcard. @param templateMessage Input string @param occurrence String searched. @return The number of occurrences.
[ "Count", "the", "number", "of", "occurrences", "of", "a", "given", "wildcard", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Messages.java#L166-L178
105,106
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeFailedResult
public void writeFailedResult(int line, String value) { logger.debug("Write Failed result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
java
public void writeFailedResult(int line, String value) { logger.debug("Write Failed result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
[ "public", "void", "writeFailedResult", "(", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Failed result => line:{} value:{}\"", ",", "line", ",", "value", ")", ";", "writeValue", "(", "resultColumnName", ",", "line", ",",...
Writes a fail result @param line The line number @param value The value
[ "Writes", "a", "fail", "result" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L143-L146
105,107
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeSuccessResult
public void writeSuccessResult(int line) { logger.debug("Write Success result => line:{}", line); writeValue(resultColumnName, line, Messages.getMessage(Messages.SUCCESS_MESSAGE)); }
java
public void writeSuccessResult(int line) { logger.debug("Write Success result => line:{}", line); writeValue(resultColumnName, line, Messages.getMessage(Messages.SUCCESS_MESSAGE)); }
[ "public", "void", "writeSuccessResult", "(", "int", "line", ")", "{", "logger", ".", "debug", "(", "\"Write Success result => line:{}\"", ",", "line", ")", ";", "writeValue", "(", "resultColumnName", ",", "line", ",", "Messages", ".", "getMessage", "(", "Message...
Writes a success result @param line The line number
[ "Writes", "a", "success", "result" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L154-L157
105,108
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeWarningResult
public void writeWarningResult(int line, String value) { logger.debug("Write Warning result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
java
public void writeWarningResult(int line, String value) { logger.debug("Write Warning result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
[ "public", "void", "writeWarningResult", "(", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Warning result => line:{} value:{}\"", ",", "line", ",", "value", ")", ";", "writeValue", "(", "resultColumnName", ",", "line", ",...
Writes a warning result @param line The line number @param value The value
[ "Writes", "a", "warning", "result" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L167-L170
105,109
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeDataResult
public void writeDataResult(String column, int line, String value) { logger.debug("Write Data result => column:{} line:{} value:{}", column, line, value); writeValue(column, line, value); }
java
public void writeDataResult(String column, int line, String value) { logger.debug("Write Data result => column:{} line:{} value:{}", column, line, value); writeValue(column, line, value); }
[ "public", "void", "writeDataResult", "(", "String", "column", ",", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Data result => column:{} line:{} value:{}\"", ",", "column", ",", "line", ",", "value", ")", ";", "writeValu...
Writes some data as result. @param column The column name @param line The line number @param value The data value
[ "Writes", "some", "data", "as", "result", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L182-L185
105,110
NoraUi/NoraUi
src/main/java/com/github/noraui/cucumber/interceptor/ConditionedInterceptor.java
ConditionedInterceptor.displayMessageAtTheBeginningOfMethod
private void displayMessageAtTheBeginningOfMethod(String methodName, List<GherkinStepCondition> conditions) { logger.debug("{} with {} contition(s)", methodName, conditions.size()); displayConditionsAtTheBeginningOfMethod(conditions); }
java
private void displayMessageAtTheBeginningOfMethod(String methodName, List<GherkinStepCondition> conditions) { logger.debug("{} with {} contition(s)", methodName, conditions.size()); displayConditionsAtTheBeginningOfMethod(conditions); }
[ "private", "void", "displayMessageAtTheBeginningOfMethod", "(", "String", "methodName", ",", "List", "<", "GherkinStepCondition", ">", "conditions", ")", "{", "logger", ".", "debug", "(", "\"{} with {} contition(s)\"", ",", "methodName", ",", "conditions", ".", "size"...
Display a message at the beginning of method. @param methodName is the name of method for logs @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}).
[ "Display", "a", "message", "at", "the", "beginning", "of", "method", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/cucumber/interceptor/ConditionedInterceptor.java#L63-L66
105,111
NoraUi/NoraUi
src/main/java/com/github/noraui/cucumber/interceptor/ConditionedInterceptor.java
ConditionedInterceptor.checkConditions
public boolean checkConditions(List<GherkinStepCondition> conditions) { for (GherkinStepCondition gherkinCondition : conditions) { logger.debug("checkConditions {} in context is ", gherkinCondition.getActual(), Context.getValue(gherkinCondition.getActual())); if (!gherkinCondition.checkC...
java
public boolean checkConditions(List<GherkinStepCondition> conditions) { for (GherkinStepCondition gherkinCondition : conditions) { logger.debug("checkConditions {} in context is ", gherkinCondition.getActual(), Context.getValue(gherkinCondition.getActual())); if (!gherkinCondition.checkC...
[ "public", "boolean", "checkConditions", "(", "List", "<", "GherkinStepCondition", ">", "conditions", ")", "{", "for", "(", "GherkinStepCondition", "gherkinCondition", ":", "conditions", ")", "{", "logger", ".", "debug", "(", "\"checkConditions {} in context is \"", ",...
Check all conditions. @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @return a boolean
[ "Check", "all", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/cucumber/interceptor/ConditionedInterceptor.java#L105-L113
105,112
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/RESTSteps.java
RESTSteps.saveValue
@Conditioned @Et("Je sauvegarde la valeur de cette API REST '(.*)' '(.*)' '(.*)' dans '(.*)' du contexte[\\.|\\?]") @And("I save the value of REST API '(.*)' '(.*)' '(.*)' in '(.*)' context key[\\.|\\?]") public void saveValue(String method, String pageKey, String uri, String targetKey, List<GherkinStepCond...
java
@Conditioned @Et("Je sauvegarde la valeur de cette API REST '(.*)' '(.*)' '(.*)' dans '(.*)' du contexte[\\.|\\?]") @And("I save the value of REST API '(.*)' '(.*)' '(.*)' in '(.*)' context key[\\.|\\?]") public void saveValue(String method, String pageKey, String uri, String targetKey, List<GherkinStepCond...
[ "@", "Conditioned", "@", "Et", "(", "\"Je sauvegarde la valeur de cette API REST '(.*)' '(.*)' '(.*)' dans '(.*)' du contexte[\\\\.|\\\\?]\"", ")", "@", "And", "(", "\"I save the value of REST API '(.*)' '(.*)' '(.*)' in '(.*)' context key[\\\\.|\\\\?]\"", ")", "public", "void", "saveVal...
Save result of REST API in memory if all 'expected' parameters equals 'actual' parameters in conditions. @param method GET or POST @param pageKey is the key of page (example: GOOGLE_HOME) @param uri end of the url @param targetKey Target key to save retrieved value. @param conditions List of 'expected' values conditio...
[ "Save", "result", "of", "REST", "API", "in", "memory", "if", "all", "expected", "parameters", "equals", "actual", "parameters", "in", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/RESTSteps.java#L61-L77
105,113
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/MailSteps.java
MailSteps.validActivationEmail
@Experimental(name = "validActivationEmail") @RetryOnFailure(attempts = 3, delay = 60) @Conditioned @Et("Je valide le mail d'activation '(.*)'[\\.|\\?]") @And("I valid activation email '(.*)'[\\.|\\?]") public void validActivationEmail(String mailHost, String mailUser, String mailPassword, String se...
java
@Experimental(name = "validActivationEmail") @RetryOnFailure(attempts = 3, delay = 60) @Conditioned @Et("Je valide le mail d'activation '(.*)'[\\.|\\?]") @And("I valid activation email '(.*)'[\\.|\\?]") public void validActivationEmail(String mailHost, String mailUser, String mailPassword, String se...
[ "@", "Experimental", "(", "name", "=", "\"validActivationEmail\"", ")", "@", "RetryOnFailure", "(", "attempts", "=", "3", ",", "delay", "=", "60", ")", "@", "Conditioned", "@", "Et", "(", "\"Je valide le mail d'activation '(.*)'[\\\\.|\\\\?]\"", ")", "@", "And", ...
Valid activation email. @param mailHost example: imap.gmail.com @param mailUser login of mail box @param mailPassword password of mail box @param firstCssQuery the first matching element @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). ...
[ "Valid", "activation", "email", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/MailSteps.java#L83-L110
105,114
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/steps/BrowserSteps.java
BrowserSteps.openUrlIfDifferent
@Times({ @Time(name = "AM"), @Time(name = "{pageKey}") }) @Conditioned @Lorsque("'(.*)' est ouvert[\\.|\\?]") @Given("'(.*)' is opened[\\.|\\?]") public void openUrlIfDifferent(@TimeName("pageKey") String pageKey, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { ...
java
@Times({ @Time(name = "AM"), @Time(name = "{pageKey}") }) @Conditioned @Lorsque("'(.*)' est ouvert[\\.|\\?]") @Given("'(.*)' is opened[\\.|\\?]") public void openUrlIfDifferent(@TimeName("pageKey") String pageKey, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { ...
[ "@", "Times", "(", "{", "@", "Time", "(", "name", "=", "\"AM\"", ")", ",", "@", "Time", "(", "name", "=", "\"{pageKey}\"", ")", "}", ")", "@", "Conditioned", "@", "Lorsque", "(", "\"'(.*)' est ouvert[\\\\.|\\\\?]\"", ")", "@", "Given", "(", "\"'(.*)' is ...
Open Url if different with conditions. @param pageKey is the key of page (example: GOOGLE_HOME) @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalException is thrown if you have a technical error (format, configuration, ...
[ "Open", "Url", "if", "different", "with", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/steps/BrowserSteps.java#L78-L84
105,115
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/steps/BrowserSteps.java
BrowserSteps.goToUrl
@Et("Je retourne vers '(.*)'") @And("I go back to '(.*)'") public void goToUrl(String pageKey) throws TechnicalException, FailureException { goToUrl(pageKey, true); }
java
@Et("Je retourne vers '(.*)'") @And("I go back to '(.*)'") public void goToUrl(String pageKey) throws TechnicalException, FailureException { goToUrl(pageKey, true); }
[ "@", "Et", "(", "\"Je retourne vers '(.*)'\"", ")", "@", "And", "(", "\"I go back to '(.*)'\"", ")", "public", "void", "goToUrl", "(", "String", "pageKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "goToUrl", "(", "pageKey", ",", "true", ...
Go to Url. @param pageKey is key corresponding to url of target. @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_TO_OPEN_A_NEW_WINDOW} message (with screenshot, with exception) ...
[ "Go", "to", "Url", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/steps/BrowserSteps.java#L97-L101
105,116
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/steps/BrowserSteps.java
BrowserSteps.navigateTo
private void navigateTo(String pageKey, String urlToOpen, String windowHandle) { Context.addWindow(pageKey, windowHandle); Context.setMainWindow(pageKey); Context.getDriver().navigate().to(urlToOpen); }
java
private void navigateTo(String pageKey, String urlToOpen, String windowHandle) { Context.addWindow(pageKey, windowHandle); Context.setMainWindow(pageKey); Context.getDriver().navigate().to(urlToOpen); }
[ "private", "void", "navigateTo", "(", "String", "pageKey", ",", "String", "urlToOpen", ",", "String", "windowHandle", ")", "{", "Context", ".", "addWindow", "(", "pageKey", ",", "windowHandle", ")", ";", "Context", ".", "setMainWindow", "(", "pageKey", ")", ...
navigateTo change url on the same window.
[ "navigateTo", "change", "url", "on", "the", "same", "window", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/steps/BrowserSteps.java#L267-L271
105,117
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/steps/BrowserSteps.java
BrowserSteps.switchToWindow
private void switchToWindow(String key, String handleToKeep) { Context.addWindow(key, handleToKeep); Context.setMainWindow(key); Context.getDriver().switchTo().window(handleToKeep); }
java
private void switchToWindow(String key, String handleToKeep) { Context.addWindow(key, handleToKeep); Context.setMainWindow(key); Context.getDriver().switchTo().window(handleToKeep); }
[ "private", "void", "switchToWindow", "(", "String", "key", ",", "String", "handleToKeep", ")", "{", "Context", ".", "addWindow", "(", "key", ",", "handleToKeep", ")", ";", "Context", ".", "setMainWindow", "(", "key", ")", ";", "Context", ".", "getDriver", ...
switchToWindow switch to an other Window.
[ "switchToWindow", "switch", "to", "an", "other", "Window", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/steps/BrowserSteps.java#L276-L280
105,118
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.clickOn
protected void clickOn(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOn: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClickable(Util...
java
protected void clickOn(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOn: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClickable(Util...
[ "protected", "void", "clickOn", "(", "PageElement", "toClick", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "displayMessageAtTheBeginningOfMethod", "(", "\"clickOn: %s in %s\"", ",", "toClick", ".", "toString", "(", ...
Click on html element. @param toClick html element @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_TO_OPEN_ON_CLI...
[ "Click", "on", "html", "element", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L113-L121
105,119
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkInputText
protected boolean checkInputText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { WebElement inputText = null; String value = getTextOrKey(textOrKey); try { inputText = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities...
java
protected boolean checkInputText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { WebElement inputText = null; String value = getTextOrKey(textOrKey); try { inputText = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities...
[ "protected", "boolean", "checkInputText", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "FailureException", ",", "TechnicalException", "{", "WebElement", "inputText", "=", "null", ";", "String", "value", "=", "getTextOrKey", "(", "tex...
Checks if input text contains expected value. @param pageElement Is target element @param textOrKey Is the data to check (text or text in context (after a save)) @return true or false @throws FailureException if the scenario encounters a functional error @throws TechnicalException
[ "Checks", "if", "input", "text", "contains", "expected", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L288-L297
105,120
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.expectText
protected void expectText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { WebElement element = null; String value = getTextOrKey(textOrKey); try { element = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator...
java
protected void expectText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException { WebElement element = null; String value = getTextOrKey(textOrKey); try { element = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator...
[ "protected", "void", "expectText", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "FailureException", ",", "TechnicalException", "{", "WebElement", "element", "=", "null", ";", "String", "value", "=", "getTextOrKey", "(", "textOrKey", ...
Expects that an element contains expected value. @param pageElement Is target element @param textOrKey Is the expected data (text or text in context (after a save)) @throws FailureException if the scenario encounters a functional error @throws TechnicalException
[ "Expects", "that", "an", "element", "contains", "expected", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L310-L326
105,121
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkMandatoryTextField
protected boolean checkMandatoryTextField(PageElement pageElement) throws FailureException { WebElement inputText = null; try { inputText = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator(pageElement))); } catch (final Exception e) { ...
java
protected boolean checkMandatoryTextField(PageElement pageElement) throws FailureException { WebElement inputText = null; try { inputText = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator(pageElement))); } catch (final Exception e) { ...
[ "protected", "boolean", "checkMandatoryTextField", "(", "PageElement", "pageElement", ")", "throws", "FailureException", "{", "WebElement", "inputText", "=", "null", ";", "try", "{", "inputText", "=", "Context", ".", "waitUntil", "(", "ExpectedConditions", ".", "pre...
Checks mandatory text field. @param pageElement Is concerned element @return true or false @throws FailureException if the scenario encounters a functional error
[ "Checks", "mandatory", "text", "field", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L337-L345
105,122
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkText
protected void checkText(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { WebElement webElement = null; String value = getTextOrKey(textOrKey); try { webElement = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLo...
java
protected void checkText(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { WebElement webElement = null; String value = getTextOrKey(textOrKey); try { webElement = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLo...
[ "protected", "void", "checkText", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "WebElement", "webElement", "=", "null", ";", "String", "value", "=", "getTextOrKey", "(", "textOrKey"...
Checks if HTML text contains expected value. @param pageElement Is target element @param textOrKey Is the new data (text or text in context (after a save)) @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Me...
[ "Checks", "if", "HTML", "text", "contains", "expected", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L371-L386
105,123
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.updateList
protected void updateList(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { String value = getTextOrKey(textOrKey); try { setDropDownValue(pageElement, value); } catch (final Exception e) { new Result.Failure<>(e.getMessage(), M...
java
protected void updateList(PageElement pageElement, String textOrKey) throws TechnicalException, FailureException { String value = getTextOrKey(textOrKey); try { setDropDownValue(pageElement, value); } catch (final Exception e) { new Result.Failure<>(e.getMessage(), M...
[ "protected", "void", "updateList", "(", "PageElement", "pageElement", ",", "String", "textOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "String", "value", "=", "getTextOrKey", "(", "textOrKey", ")", ";", "try", "{", "setDropDownValue", ...
Update a html select with a text value. @param pageElement Is target element @param textOrKey Is the new data (text or text in context (after a save)) @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Message...
[ "Update", "a", "html", "select", "with", "a", "text", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L457-L465
105,124
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.updateDateValidated
protected void updateDateValidated(PageElement pageElement, String dateType, String date) throws TechnicalException, FailureException { logger.debug("updateDateValidated with elementName={}, dateType={} and date={}", pageElement, dateType, date); final DateFormat formatter = new SimpleDateFormat(Const...
java
protected void updateDateValidated(PageElement pageElement, String dateType, String date) throws TechnicalException, FailureException { logger.debug("updateDateValidated with elementName={}, dateType={} and date={}", pageElement, dateType, date); final DateFormat formatter = new SimpleDateFormat(Const...
[ "protected", "void", "updateDateValidated", "(", "PageElement", "pageElement", ",", "String", "dateType", ",", "String", "date", ")", "throws", "TechnicalException", ",", "FailureException", "{", "logger", ".", "debug", "(", "\"updateDateValidated with elementName={}, dat...
Update a html input text value with a date. @param pageElement Is target element @param dateType "any", "future", "today", "future_strict" @param date Is the new data (date) @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.gith...
[ "Update", "a", "html", "input", "text", "value", "with", "a", "date", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L506-L529
105,125
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.saveElementValue
protected void saveElementValue(String field, String targetKey, Page page) throws TechnicalException, FailureException { logger.debug("saveValueInStep: {} to {} in {}.", field, targetKey, page.getApplication()); String txt = ""; try { final WebElement elem = Utilities.findElement...
java
protected void saveElementValue(String field, String targetKey, Page page) throws TechnicalException, FailureException { logger.debug("saveValueInStep: {} to {} in {}.", field, targetKey, page.getApplication()); String txt = ""; try { final WebElement elem = Utilities.findElement...
[ "protected", "void", "saveElementValue", "(", "String", "field", ",", "String", "targetKey", ",", "Page", "page", ")", "throws", "TechnicalException", ",", "FailureException", "{", "logger", ".", "debug", "(", "\"saveValueInStep: {} to {} in {}.\"", ",", "field", ",...
Save value in memory. @param field is name of the field to retrieve. @param targetKey is the key to save value to @param page is target page. @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_ME...
[ "Save", "value", "in", "memory", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L568-L584
105,126
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.checkRadioList
protected boolean checkRadioList(PageElement pageElement, String value) throws FailureException { try { final List<WebElement> radioButtons = Context.waitUntil(ExpectedConditions.presenceOfAllElementsLocatedBy(Utilities.getLocator(pageElement))); for (final WebElement button : radioBu...
java
protected boolean checkRadioList(PageElement pageElement, String value) throws FailureException { try { final List<WebElement> radioButtons = Context.waitUntil(ExpectedConditions.presenceOfAllElementsLocatedBy(Utilities.getLocator(pageElement))); for (final WebElement button : radioBu...
[ "protected", "boolean", "checkRadioList", "(", "PageElement", "pageElement", ",", "String", "value", ")", "throws", "FailureException", "{", "try", "{", "final", "List", "<", "WebElement", ">", "radioButtons", "=", "Context", ".", "waitUntil", "(", "ExpectedCondit...
Checks that given value is matching the selected radio list button. @param pageElement The page element @param value The value to check the selection from @return true if the given value is selected, false otherwise. @throws FailureException if the scenario encounters a functional error
[ "Checks", "that", "given", "value", "is", "matching", "the", "selected", "radio", "list", "button", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L631-L643
105,127
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.updateRadioList
protected void updateRadioList(PageElement pageElement, String valueOrKey) throws TechnicalException, FailureException { final String value = Context.getValue(valueOrKey) != null ? Context.getValue(valueOrKey) : valueOrKey; try { final List<WebElement> radioButtons = Context.waitUntil(Exp...
java
protected void updateRadioList(PageElement pageElement, String valueOrKey) throws TechnicalException, FailureException { final String value = Context.getValue(valueOrKey) != null ? Context.getValue(valueOrKey) : valueOrKey; try { final List<WebElement> radioButtons = Context.waitUntil(Exp...
[ "protected", "void", "updateRadioList", "(", "PageElement", "pageElement", ",", "String", "valueOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "final", "String", "value", "=", "Context", ".", "getValue", "(", "valueOrKey", ")", "!=", "n...
Update html radio button by text "input". @param pageElement Is concerned element @param valueOrKey Is the value (value or value in context (after a save)) use for selection @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Failure with {@value com.github...
[ "Update", "html", "radio", "button", "by", "text", "input", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L658-L671
105,128
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.passOver
protected void passOver(PageElement element) throws TechnicalException, FailureException { try { final String javascript = "var evObj = document.createEvent('MouseEvents');" + "evObj.initMouseEvent(\"mouseover\",true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0...
java
protected void passOver(PageElement element) throws TechnicalException, FailureException { try { final String javascript = "var evObj = document.createEvent('MouseEvents');" + "evObj.initMouseEvent(\"mouseover\",true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0...
[ "protected", "void", "passOver", "(", "PageElement", "element", ")", "throws", "TechnicalException", ",", "FailureException", "{", "try", "{", "final", "String", "javascript", "=", "\"var evObj = document.createEvent('MouseEvents');\"", "+", "\"evObj.initMouseEvent(\\\"mouseo...
Passes over a specific page element triggering 'mouseover' js event. @param element Target page element @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Failure with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_TO_PASS_OVER_ELEMENT} messa...
[ "Passes", "over", "a", "specific", "page", "element", "triggering", "mouseover", "js", "event", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L684-L695
105,129
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.selectCheckbox
protected void selectCheckbox(PageElement element, boolean checked, Object... args) throws TechnicalException, FailureException { try { final WebElement webElement = Context.waitUntil(ExpectedConditions.elementToBeClickable(Utilities.getLocator(element, args))); if (webElement.isSelec...
java
protected void selectCheckbox(PageElement element, boolean checked, Object... args) throws TechnicalException, FailureException { try { final WebElement webElement = Context.waitUntil(ExpectedConditions.elementToBeClickable(Utilities.getLocator(element, args))); if (webElement.isSelec...
[ "protected", "void", "selectCheckbox", "(", "PageElement", "element", ",", "boolean", "checked", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "try", "{", "final", "WebElement", "webElement", "=", "Context", ".", ...
Checks a checkbox type element. @param element Target page element @param checked Final checkbox value @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Failure with {@value com.github.noraui...
[ "Checks", "a", "checkbox", "type", "element", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L712-L722
105,130
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.switchFrame
protected void switchFrame(PageElement element, Object... args) throws FailureException, TechnicalException { try { Context.waitUntil(ExpectedConditions.frameToBeAvailableAndSwitchToIt(Utilities.getLocator(element, args))); } catch (final Exception e) { new Result.Failure<>(e...
java
protected void switchFrame(PageElement element, Object... args) throws FailureException, TechnicalException { try { Context.waitUntil(ExpectedConditions.frameToBeAvailableAndSwitchToIt(Utilities.getLocator(element, args))); } catch (final Exception e) { new Result.Failure<>(e...
[ "protected", "void", "switchFrame", "(", "PageElement", "element", ",", "Object", "...", "args", ")", "throws", "FailureException", ",", "TechnicalException", "{", "try", "{", "Context", ".", "waitUntil", "(", "ExpectedConditions", ".", "frameToBeAvailableAndSwitchToI...
Switches to the given frame. @param element The PageElement representing a frame. @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAI...
[ "Switches", "to", "the", "given", "frame", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L769-L776
105,131
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.uploadFile
protected void uploadFile(PageElement pageElement, String fileOrKey, Object... args) throws TechnicalException, FailureException { final String path = Context.getValue(fileOrKey) != null ? Context.getValue(fileOrKey) : System.getProperty(USER_DIR) + File.separator + DOWNLOADED_FILES_FOLDER + File.separator + f...
java
protected void uploadFile(PageElement pageElement, String fileOrKey, Object... args) throws TechnicalException, FailureException { final String path = Context.getValue(fileOrKey) != null ? Context.getValue(fileOrKey) : System.getProperty(USER_DIR) + File.separator + DOWNLOADED_FILES_FOLDER + File.separator + f...
[ "protected", "void", "uploadFile", "(", "PageElement", "pageElement", ",", "String", "fileOrKey", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "final", "String", "path", "=", "Context", ".", "getValue", "(", "f...
Updates a html file input with the path of the file to upload. @param pageElement Is target element @param fileOrKey Is the file path (text or text in context (after a save)) @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, conf...
[ "Updates", "a", "html", "file", "input", "with", "the", "path", "of", "the", "file", "to", "upload", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L793-L811
105,132
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.getAllCucumberMethods
public static Map<String, Method> getAllCucumberMethods(Class<?> clazz) { final Map<String, Method> result = new HashMap<>(); final CucumberOptions co = clazz.getAnnotation(CucumberOptions.class); final Set<Class<?>> classes = getClasses(co.glue()); classes.add(BrowserSteps.class); ...
java
public static Map<String, Method> getAllCucumberMethods(Class<?> clazz) { final Map<String, Method> result = new HashMap<>(); final CucumberOptions co = clazz.getAnnotation(CucumberOptions.class); final Set<Class<?>> classes = getClasses(co.glue()); classes.add(BrowserSteps.class); ...
[ "public", "static", "Map", "<", "String", ",", "Method", ">", "getAllCucumberMethods", "(", "Class", "<", "?", ">", "clazz", ")", "{", "final", "Map", "<", "String", ",", "Method", ">", "result", "=", "new", "HashMap", "<>", "(", ")", ";", "final", "...
Gets all Cucumber methods. @param clazz Class which is the main point of the application (Decorated with the annotation {@link cucumber.api.CucumberOptions}) @return a Map of all Cucumber glue code methods of the application. First part of the entry is the Gherkin matching regular expression. Second part is the corres...
[ "Gets", "all", "Cucumber", "methods", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L992-L1009
105,133
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/Auth.java
Auth.getAuthenticationCookie
public static Cookie getAuthenticationCookie(String domainUrl) throws TechnicalException { if (getInstance().authCookie == null) { final String cookieStr = System.getProperty(SESSION_COOKIE); try { if (cookieStr != null && !"".equals(cookieStr)) { fina...
java
public static Cookie getAuthenticationCookie(String domainUrl) throws TechnicalException { if (getInstance().authCookie == null) { final String cookieStr = System.getProperty(SESSION_COOKIE); try { if (cookieStr != null && !"".equals(cookieStr)) { fina...
[ "public", "static", "Cookie", "getAuthenticationCookie", "(", "String", "domainUrl", ")", "throws", "TechnicalException", "{", "if", "(", "getInstance", "(", ")", ".", "authCookie", "==", "null", ")", "{", "final", "String", "cookieStr", "=", "System", ".", "g...
Returns a Cookie object by retrieving data from -Dcookie maven parameter. @param domainUrl the domain on which the cookie is applied @return a Cookie with a name, value, domain and path. @throws TechnicalException with a message (no screenshot, no exception)
[ "Returns", "a", "Cookie", "object", "by", "retrieving", "data", "from", "-", "Dcookie", "maven", "parameter", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/Auth.java#L139-L158
105,134
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/Auth.java
Auth.usingAuthentication
public static String usingAuthentication(String url) { if (authenticationTypes.BASIC.toString().equals(getInstance().authenticationType)) { return url.replace("://", "://" + getLogin() + ":" + getPassword() + "@"); } return url; }
java
public static String usingAuthentication(String url) { if (authenticationTypes.BASIC.toString().equals(getInstance().authenticationType)) { return url.replace("://", "://" + getLogin() + ":" + getPassword() + "@"); } return url; }
[ "public", "static", "String", "usingAuthentication", "(", "String", "url", ")", "{", "if", "(", "authenticationTypes", ".", "BASIC", ".", "toString", "(", ")", ".", "equals", "(", "getInstance", "(", ")", ".", "authenticationType", ")", ")", "{", "return", ...
Process a given url using the current authentication mode. @param url url to access behind authentication @return the given url processed using the right authentication mode
[ "Process", "a", "given", "url", "using", "the", "current", "authentication", "mode", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/Auth.java#L178-L184
105,135
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Utilities.java
Utilities.isElementPresentAndGetFirstOne
public static WebElement isElementPresentAndGetFirstOne(By element) { final WebDriver webDriver = Context.getDriver(); webDriver.manage().timeouts().implicitlyWait(DriverFactory.IMPLICIT_WAIT * 2, TimeUnit.MICROSECONDS); final List<WebElement> foundElements = webDriver.findElements(elem...
java
public static WebElement isElementPresentAndGetFirstOne(By element) { final WebDriver webDriver = Context.getDriver(); webDriver.manage().timeouts().implicitlyWait(DriverFactory.IMPLICIT_WAIT * 2, TimeUnit.MICROSECONDS); final List<WebElement> foundElements = webDriver.findElements(elem...
[ "public", "static", "WebElement", "isElementPresentAndGetFirstOne", "(", "By", "element", ")", "{", "final", "WebDriver", "webDriver", "=", "Context", ".", "getDriver", "(", ")", ";", "webDriver", ".", "manage", "(", ")", ".", "timeouts", "(", ")", ".", "imp...
Check if element present and get first one. @param element is {link org.openqa.selenium.By} find in page. @return first {link org.openqa.selenium.WebElement} finded present element.
[ "Check", "if", "element", "present", "and", "get", "first", "one", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Utilities.java#L220-L237
105,136
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.wait
@Conditioned @Lorsque("Je patiente '(.*)' secondes[\\.|\\?]") @Then("I wait '(.*)' seconds[\\.|\\?]") public void wait(int time, List<GherkinStepCondition> conditions) throws InterruptedException { Thread.sleep((long) time * 1000); }
java
@Conditioned @Lorsque("Je patiente '(.*)' secondes[\\.|\\?]") @Then("I wait '(.*)' seconds[\\.|\\?]") public void wait(int time, List<GherkinStepCondition> conditions) throws InterruptedException { Thread.sleep((long) time * 1000); }
[ "@", "Conditioned", "@", "Lorsque", "(", "\"Je patiente '(.*)' secondes[\\\\.|\\\\?]\"", ")", "@", "Then", "(", "\"I wait '(.*)' seconds[\\\\.|\\\\?]\"", ")", "public", "void", "wait", "(", "int", "time", ",", "List", "<", "GherkinStepCondition", ">", "conditions", ")...
Waits a time in second. @param time is time to wait @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws InterruptedException Exception for the sleep
[ "Waits", "a", "time", "in", "second", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L67-L72
105,137
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.waitStalenessOf
@Conditioned @Lorsque("Je patiente la disparition de '(.*)-(.*)' avec un timeout de '(.*)' secondes[\\.|\\?]") @Then("I wait staleness of '(.*)-(.*)' with timeout of '(.*)' seconds[\\.|\\?]") public void waitStalenessOf(String page, String element, int time, List<GherkinStepCondition> conditions) throws ...
java
@Conditioned @Lorsque("Je patiente la disparition de '(.*)-(.*)' avec un timeout de '(.*)' secondes[\\.|\\?]") @Then("I wait staleness of '(.*)-(.*)' with timeout of '(.*)' seconds[\\.|\\?]") public void waitStalenessOf(String page, String element, int time, List<GherkinStepCondition> conditions) throws ...
[ "@", "Conditioned", "@", "Lorsque", "(", "\"Je patiente la disparition de '(.*)-(.*)' avec un timeout de '(.*)' secondes[\\\\.|\\\\?]\"", ")", "@", "Then", "(", "\"I wait staleness of '(.*)-(.*)' with timeout of '(.*)' seconds[\\\\.|\\\\?]\"", ")", "public", "void", "waitStalenessOf", ...
Waits staleness of element with timeout of x seconds. @param page The concerned page of field @param element is key of PageElement concerned @param time is custom timeout @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws Technica...
[ "Waits", "staleness", "of", "element", "with", "timeout", "of", "x", "seconds", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L110-L116
105,138
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.loop
@Lorsque("Si '(.*)' vérifie '(.*)', je fais '(.*)' fois:") @Then("If '(.*)' matches '(.*)', I do '(.*)' times:") public void loop(String actual, String expected, int times, List<GherkinConditionedLoopedStep> steps) { try { if (new GherkinStepCondition("loopKey", expected, actual).checkCo...
java
@Lorsque("Si '(.*)' vérifie '(.*)', je fais '(.*)' fois:") @Then("If '(.*)' matches '(.*)', I do '(.*)' times:") public void loop(String actual, String expected, int times, List<GherkinConditionedLoopedStep> steps) { try { if (new GherkinStepCondition("loopKey", expected, actual).checkCo...
[ "@", "Lorsque", "(", "\"Si '(.*)' vérifie '(.*)', je fais '(.*)' fois:\")", "\r", "@", "Then", "(", "\"If '(.*)' matches '(.*)', I do '(.*)' times:\"", ")", "public", "void", "loop", "(", "String", "actual", ",", "String", "expected", ",", "int", "times", ",", "List", ...
Loops on steps execution for a specific number of times. @param actual actual value for global condition. @param expected expected value for global condition. @param times Number of loops. @param steps List of steps run in a loop.
[ "Loops", "on", "steps", "execution", "for", "a", "specific", "number", "of", "times", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L130-L142
105,139
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkMandatoryFields
@Lorsque("Je vérifie les champs obligatoires:") @Given("I check mandatory fields:") public void checkMandatoryFields(Map<String, String> mandatoryFields) throws TechnicalException, FailureException { final List<String> errors = new ArrayList<>(); for (final Entry<String, String> element : ma...
java
@Lorsque("Je vérifie les champs obligatoires:") @Given("I check mandatory fields:") public void checkMandatoryFields(Map<String, String> mandatoryFields) throws TechnicalException, FailureException { final List<String> errors = new ArrayList<>(); for (final Entry<String, String> element : ma...
[ "@", "Lorsque", "(", "\"Je vérifie les champs obligatoires:\")", "\r", "@", "Given", "(", "\"I check mandatory fields:\"", ")", "public", "void", "checkMandatoryFields", "(", "Map", "<", "String", ",", "String", ">", "mandatoryFields", ")", "throws", "TechnicalException...
Check all mandatory fields. @param mandatoryFields is a Map of mandatory fields @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_EMPTY_DATA} message (no screenshot) @throws FailureExcep...
[ "Check", "all", "mandatory", "fields", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L248-L277
105,140
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.saveValue
@Conditioned @Et("Je sauvegarde la valeur de '(.*)-(.*)' dans la clé '(.*)' du contexte[\\.|\\?]") @And("I save the value of '(.*)-(.*)' in '(.*)' context key[\\.|\\?]") public void saveValue(String page, String field, String targetKey, List<GherkinStepCondition> conditions) throws TechnicalException, Fa...
java
@Conditioned @Et("Je sauvegarde la valeur de '(.*)-(.*)' dans la clé '(.*)' du contexte[\\.|\\?]") @And("I save the value of '(.*)-(.*)' in '(.*)' context key[\\.|\\?]") public void saveValue(String page, String field, String targetKey, List<GherkinStepCondition> conditions) throws TechnicalException, Fa...
[ "@", "Conditioned", "@", "Et", "(", "\"Je sauvegarde la valeur de '(.*)-(.*)' dans la clé '(.*)' du contexte[\\\\.|\\\\?]\")", "\r", "@", "And", "(", "\"I save the value of '(.*)-(.*)' in '(.*)' context key[\\\\.|\\\\?]\"", ")", "public", "void", "saveValue", "(", "String", "page",...
Save field in memory if all 'expected' parameters equals 'actual' parameters in conditions. The value is saved directly into the Context targetKey. @param page The concerned page of field @param field Name of the field to save in memory. @param targetKey Target key to save retrieved value. @param conditions list of 'e...
[ "Save", "field", "in", "memory", "if", "all", "expected", "parameters", "equals", "actual", "parameters", "in", "conditions", ".", "The", "value", "is", "saved", "directly", "into", "the", "Context", "targetKey", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L362-L367
105,141
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.clickOn
@Conditioned @Quand("Je clique sur '(.*)-(.*)'[\\.|\\?]") @When("I click on '(.*)-(.*)'[\\.|\\?]") public void clickOn(String page, String toClick, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.debug("{} clickOn: {}", page, toClick); clickOn...
java
@Conditioned @Quand("Je clique sur '(.*)-(.*)'[\\.|\\?]") @When("I click on '(.*)-(.*)'[\\.|\\?]") public void clickOn(String page, String toClick, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.debug("{} clickOn: {}", page, toClick); clickOn...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je clique sur '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "@", "When", "(", "\"I click on '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "clickOn", "(", "String", "page", ",", "String", "toClick", ",", "List", "<", "GherkinStepCond...
Click on html element if all 'expected' parameters equals 'actual' parameters in conditions. @param page The concerned page of toClick @param toClick html element. @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalExcept...
[ "Click", "on", "html", "element", "if", "all", "expected", "parameters", "equals", "actual", "parameters", "in", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L384-L390
105,142
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.clickOnXpathByJs
@Conditioned @Quand("Je clique via js sur xpath '(.*)' de '(.*)' page[\\.|\\?]") @When("I click by js on xpath '(.*)' from '(.*)' page[\\.|\\?]") public void clickOnXpathByJs(String xpath, String page, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.de...
java
@Conditioned @Quand("Je clique via js sur xpath '(.*)' de '(.*)' page[\\.|\\?]") @When("I click by js on xpath '(.*)' from '(.*)' page[\\.|\\?]") public void clickOnXpathByJs(String xpath, String page, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { logger.de...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je clique via js sur xpath '(.*)' de '(.*)' page[\\\\.|\\\\?]\"", ")", "@", "When", "(", "\"I click by js on xpath '(.*)' from '(.*)' page[\\\\.|\\\\?]\"", ")", "public", "void", "clickOnXpathByJs", "(", "String", "xpath", ",", "String"...
Click on html element using Javascript if all 'expected' parameters equals 'actual' parameters in conditions. @param xpath xpath of html element @param page The concerned page of toClick @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). ...
[ "Click", "on", "html", "element", "using", "Javascript", "if", "all", "expected", "parameters", "equals", "actual", "parameters", "in", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L430-L436
105,143
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.passOver
@Conditioned @Quand("Je passe au dessus de '(.*)-(.*)'[\\.|\\?]") @When("I pass over '(.*)-(.*)'[\\.|\\?]") public void passOver(String page, String elementName, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { passOver(Page.getInstance(page).getPageElementByK...
java
@Conditioned @Quand("Je passe au dessus de '(.*)-(.*)'[\\.|\\?]") @When("I pass over '(.*)-(.*)'[\\.|\\?]") public void passOver(String page, String elementName, List<GherkinStepCondition> conditions) throws TechnicalException, FailureException { passOver(Page.getInstance(page).getPageElementByK...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je passe au dessus de '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "@", "When", "(", "\"I pass over '(.*)-(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "passOver", "(", "String", "page", ",", "String", "elementName", ",", "List", "<", "G...
Simulates the mouse over a html element @param page The concerned page of elementName @param elementName Is target element @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalException is throws if you have a technical err...
[ "Simulates", "the", "mouse", "over", "a", "html", "element" ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L500-L505
105,144
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.updateDate
@Conditioned @Quand("Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\.|\\?]") @When("I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\.|\\?]") public void updateDate(String page, String elementName, String dateType, String dateOrKey, List<GherkinStepCondition> conditions) throws Tec...
java
@Conditioned @Quand("Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\.|\\?]") @When("I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\.|\\?]") public void updateDate(String page, String elementName, String dateType, String dateOrKey, List<GherkinStepCondition> conditions) throws Tec...
[ "@", "Conditioned", "@", "Quand", "(", "\"Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "When", "(", "\"I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "updateDate", "(", "String", "page", "...
Update a html input text with a date. @param page The concerned page of elementName @param elementName is target element @param dateOrKey Is the new date (date or date in context (after a save)) @param dateType 'future', 'future_strict', 'today' or 'any' @param conditions list of 'expected' values condition and 'actua...
[ "Update", "a", "html", "input", "text", "with", "a", "date", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L526-L539
105,145
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkMandatoryField
@Conditioned @Lorsque("Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\.|\\?]") @Then("I check mandatory field '(.*)-(.*)' of type '(.*)'[\\.|\\?]") public void checkMandatoryField(String page, String fieldName, String type, List<GherkinStepCondition> conditions) throws TechnicalException, F...
java
@Conditioned @Lorsque("Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\.|\\?]") @Then("I check mandatory field '(.*)-(.*)' of type '(.*)'[\\.|\\?]") public void checkMandatoryField(String page, String fieldName, String type, List<GherkinStepCondition> conditions) throws TechnicalException, F...
[ "@", "Conditioned", "@", "Lorsque", "(", "\"Je vérifie le champ obligatoire '(.*)-(.*)' de type '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "Then", "(", "\"I check mandatory field '(.*)-(.*)' of type '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "checkMandatoryField", "(", "String", "page...
Checks that mandatory field is no empty with conditions. @param page The concerned page of fieldName @param fieldName Name of the field to check (see .ini file) @param type Type of the field ('text', 'select'...). Only 'text' is implemented for the moment! @param conditions list of 'expected' values condition and 'act...
[ "Checks", "that", "mandatory", "field", "is", "no", "empty", "with", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L653-L668
105,146
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkInputText
@Conditioned @Et("Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I check text '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void checkInputText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { if (!c...
java
@Conditioned @Et("Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I check text '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void checkInputText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { if (!c...
[ "@", "Conditioned", "@", "Et", "(", "\"Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "And", "(", "\"I check text '(.*)-(.*)' with '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "checkInputText", "(", "String", "page", ",", "String", "elementName", ...
Checks if html input text contains expected value. @param page The concerned page of elementName @param elementName The key of the PageElement to check @param textOrKey Is the new data (text or text in context (after a save)) @param conditions list of 'expected' values condition and 'actual' values ({@link com.github....
[ "Checks", "if", "html", "input", "text", "contains", "expected", "value", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L687-L694
105,147
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkElementVisible
@Conditioned @Et("Je vérifie que '(.*)-(.*)' est visible[\\.|\\?]") @And("I check that '(.*)-(.*)' is visible[\\.|\\?]") public void checkElementVisible(String page, String elementName, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { checkElementVisible(Page....
java
@Conditioned @Et("Je vérifie que '(.*)-(.*)' est visible[\\.|\\?]") @And("I check that '(.*)-(.*)' is visible[\\.|\\?]") public void checkElementVisible(String page, String elementName, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { checkElementVisible(Page....
[ "@", "Conditioned", "@", "Et", "(", "\"Je vérifie que '(.*)-(.*)' est visible[\\\\.|\\\\?]\")", "\r", "@", "And", "(", "\"I check that '(.*)-(.*)' is visible[\\\\.|\\\\?]\"", ")", "public", "void", "checkElementVisible", "(", "String", "page", ",", "String", "elementName", ...
Checks if an html element is visible. @param page The concerned page of elementName @param elementName The key of the PageElement to check @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalException is throws if you have...
[ "Checks", "if", "an", "html", "element", "is", "visible", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L711-L716
105,148
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkAlert
@Et("Je vérifie le message '(.*)' sur l'alerte") @And("I check message '(.*)' on alert") public void checkAlert(String messageOrKey) throws TechnicalException, FailureException { final String message = Context.getValue(messageOrKey) != null ? Context.getValue(messageOrKey) : messageOrKey; fi...
java
@Et("Je vérifie le message '(.*)' sur l'alerte") @And("I check message '(.*)' on alert") public void checkAlert(String messageOrKey) throws TechnicalException, FailureException { final String message = Context.getValue(messageOrKey) != null ? Context.getValue(messageOrKey) : messageOrKey; fi...
[ "@", "Et", "(", "\"Je vérifie le message '(.*)' sur l'alerte\")", "\r", "@", "And", "(", "\"I check message '(.*)' on alert\"", ")", "public", "void", "checkAlert", "(", "String", "messageOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "final", ...
Checks that a given page displays a html alert with a message. @param messageOrKey Is message (message or message in context (after a save)) displayed on html alert @throws FailureException if the scenario encounters a functional error @throws TechnicalException is throws if you have a technical error (format, configu...
[ "Checks", "that", "a", "given", "page", "displays", "a", "html", "alert", "with", "a", "message", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L816-L824
105,149
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.updateRadioList
@Conditioned @Et("Je mets à jour la liste radio '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I update radio list '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void updateRadioList(String page, String elementName, String valueOrKey, List<GherkinStepCondition> conditions) throws TechnicalException, FailureExceptio...
java
@Conditioned @Et("Je mets à jour la liste radio '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I update radio list '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void updateRadioList(String page, String elementName, String valueOrKey, List<GherkinStepCondition> conditions) throws TechnicalException, FailureExceptio...
[ "@", "Conditioned", "@", "Et", "(", "\"Je mets à jour la liste radio '(.*)-(.*)' avec '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "And", "(", "\"I update radio list '(.*)-(.*)' with '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "updateRadioList", "(", "String", "page", ",", "String", ...
Updates the value of a html radio element with conditions. @param page The concerned page of elementName @param elementName is target element @param valueOrKey Is the value (value or value in context (after a save)) use for selection @param conditions list of 'expected' values condition and 'actual' values ({@link com...
[ "Updates", "the", "value", "of", "a", "html", "radio", "element", "with", "conditions", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L843-L848
105,150
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.getDriver
public WebDriver getDriver() { // Driver's name is retrieved by system properties String driverName = Context.getBrowser(); driverName = driverName != null ? driverName : DEFAULT_DRIVER; WebDriver driver = null; if (!drivers.containsKey(driverName)) { try { ...
java
public WebDriver getDriver() { // Driver's name is retrieved by system properties String driverName = Context.getBrowser(); driverName = driverName != null ? driverName : DEFAULT_DRIVER; WebDriver driver = null; if (!drivers.containsKey(driverName)) { try { ...
[ "public", "WebDriver", "getDriver", "(", ")", "{", "// Driver's name is retrieved by system properties\r", "String", "driverName", "=", "Context", ".", "getBrowser", "(", ")", ";", "driverName", "=", "driverName", "!=", "null", "?", "driverName", ":", "DEFAULT_DRIVER"...
Get selenium driver. Drivers are lazy loaded. @return selenium driver
[ "Get", "selenium", "driver", ".", "Drivers", "are", "lazy", "loaded", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L70-L85
105,151
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.generateIEDriver
private WebDriver generateIEDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.IE); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEBDRIVER_SET_EXE...
java
private WebDriver generateIEDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.IE); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEBDRIVER_SET_EXE...
[ "private", "WebDriver", "generateIEDriver", "(", ")", "throws", "TechnicalException", "{", "final", "String", "pathWebdriver", "=", "DriverFactory", ".", "getPath", "(", "Driver", ".", "IE", ")", ";", "if", "(", "!", "new", "File", "(", "pathWebdriver", ")", ...
Generates an ie webdriver. Unable to use it with a proxy. Causes a crash. @return An ie webdriver @throws TechnicalException if an error occured when Webdriver setExecutable to true.
[ "Generates", "an", "ie", "webdriver", ".", "Unable", "to", "use", "it", "with", "a", "proxy", ".", "Causes", "a", "crash", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L105-L132
105,152
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.generateGoogleChromeDriver
private WebDriver generateGoogleChromeDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.CHROME); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEB...
java
private WebDriver generateGoogleChromeDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.CHROME); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEB...
[ "private", "WebDriver", "generateGoogleChromeDriver", "(", ")", "throws", "TechnicalException", "{", "final", "String", "pathWebdriver", "=", "DriverFactory", ".", "getPath", "(", "Driver", ".", "CHROME", ")", ";", "if", "(", "!", "new", "File", "(", "pathWebdri...
Generates a chrome webdriver. @return A chrome webdriver @throws TechnicalException if an error occured when Webdriver setExecutable to true.
[ "Generates", "a", "chrome", "webdriver", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L142-L176
105,153
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.setChromeOptions
private void setChromeOptions(final DesiredCapabilities capabilities, ChromeOptions chromeOptions) { // Set custom downloaded file path. When you check content of downloaded file by robot. final HashMap<String, Object> chromePrefs = new HashMap<>(); chromePrefs.put("download.default_directo...
java
private void setChromeOptions(final DesiredCapabilities capabilities, ChromeOptions chromeOptions) { // Set custom downloaded file path. When you check content of downloaded file by robot. final HashMap<String, Object> chromePrefs = new HashMap<>(); chromePrefs.put("download.default_directo...
[ "private", "void", "setChromeOptions", "(", "final", "DesiredCapabilities", "capabilities", ",", "ChromeOptions", "chromeOptions", ")", "{", "// Set custom downloaded file path. When you check content of downloaded file by robot.\r", "final", "HashMap", "<", "String", ",", "Objec...
Sets the target browser binary path in chromeOptions if it exists in configuration. @param capabilities The global DesiredCapabilities
[ "Sets", "the", "target", "browser", "binary", "path", "in", "chromeOptions", "if", "it", "exists", "in", "configuration", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L184-L198
105,154
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.generateFirefoxDriver
private WebDriver generateFirefoxDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.FIREFOX); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEBDRIV...
java
private WebDriver generateFirefoxDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.FIREFOX); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEBDRIV...
[ "private", "WebDriver", "generateFirefoxDriver", "(", ")", "throws", "TechnicalException", "{", "final", "String", "pathWebdriver", "=", "DriverFactory", ".", "getPath", "(", "Driver", ".", "FIREFOX", ")", ";", "if", "(", "!", "new", "File", "(", "pathWebdriver"...
Generates a firefox webdriver. @return A firefox webdriver @throws TechnicalException if an error occured when Webdriver setExecutable to true.
[ "Generates", "a", "firefox", "webdriver", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L208-L240
105,155
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.generateWebDriver
private WebDriver generateWebDriver(String driverName) throws TechnicalException { WebDriver driver; if (IE.equals(driverName)) { driver = generateIEDriver(); } else if (CHROME.equals(driverName)) { driver = generateGoogleChromeDriver(); } else if (FIREFOX.e...
java
private WebDriver generateWebDriver(String driverName) throws TechnicalException { WebDriver driver; if (IE.equals(driverName)) { driver = generateIEDriver(); } else if (CHROME.equals(driverName)) { driver = generateGoogleChromeDriver(); } else if (FIREFOX.e...
[ "private", "WebDriver", "generateWebDriver", "(", "String", "driverName", ")", "throws", "TechnicalException", "{", "WebDriver", "driver", ";", "if", "(", "IE", ".", "equals", "(", "driverName", ")", ")", "{", "driver", "=", "generateIEDriver", "(", ")", ";", ...
Generates a selenium webdriver following a name given in parameter. By default a chrome driver is generated. @param driverName The name of the web driver to generate @return An instance a web driver whose type is provided by driver name given in parameter @throws TechnicalException if an error occured when Webdriver s...
[ "Generates", "a", "selenium", "webdriver", "following", "a", "name", "given", "in", "parameter", ".", "By", "default", "a", "chrome", "driver", "is", "generated", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L253-L270
105,156
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.setLoggingLevel
private void setLoggingLevel(DesiredCapabilities caps) { final LoggingPreferences logPrefs = new LoggingPreferences(); logPrefs.enable(LogType.BROWSER, Level.ALL); logPrefs.enable(LogType.CLIENT, Level.OFF); logPrefs.enable(LogType.DRIVER, Level.OFF); logPrefs.enable(LogType...
java
private void setLoggingLevel(DesiredCapabilities caps) { final LoggingPreferences logPrefs = new LoggingPreferences(); logPrefs.enable(LogType.BROWSER, Level.ALL); logPrefs.enable(LogType.CLIENT, Level.OFF); logPrefs.enable(LogType.DRIVER, Level.OFF); logPrefs.enable(LogType...
[ "private", "void", "setLoggingLevel", "(", "DesiredCapabilities", "caps", ")", "{", "final", "LoggingPreferences", "logPrefs", "=", "new", "LoggingPreferences", "(", ")", ";", "logPrefs", ".", "enable", "(", "LogType", ".", "BROWSER", ",", "Level", ".", "ALL", ...
Sets the logging level of the generated web driver. @param caps The web driver's capabilities @param level The logging level
[ "Sets", "the", "logging", "level", "of", "the", "generated", "web", "driver", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L280-L289
105,157
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.getPath
public static String getPath(Driver currentDriver) { final OperatingSystem currentOperatingSystem = OperatingSystem.getCurrentOperatingSystem(); String format = ""; if ("webdriver.ie.driver".equals(currentDriver.driverName)) { format = Utilities.setProperty(Context.getWebdriversP...
java
public static String getPath(Driver currentDriver) { final OperatingSystem currentOperatingSystem = OperatingSystem.getCurrentOperatingSystem(); String format = ""; if ("webdriver.ie.driver".equals(currentDriver.driverName)) { format = Utilities.setProperty(Context.getWebdriversP...
[ "public", "static", "String", "getPath", "(", "Driver", "currentDriver", ")", "{", "final", "OperatingSystem", "currentOperatingSystem", "=", "OperatingSystem", ".", "getCurrentOperatingSystem", "(", ")", ";", "String", "format", "=", "\"\"", ";", "if", "(", "\"we...
Get the path of the driver given in parameters. @param currentDriver The driver to get the path of @return A String representation of the path
[ "Get", "the", "path", "of", "the", "driver", "given", "in", "parameters", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L299-L311
105,158
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Context.java
Context.getUrlByPagekey
public static String getUrlByPagekey(String pageKey) { if (pageKey != null) { for (final Map.Entry<String, Application> application : getInstance().applications.entrySet()) { for (final Map.Entry<String, String> urlPage : application.getValue().getUrlPages().entrySet()) { ...
java
public static String getUrlByPagekey(String pageKey) { if (pageKey != null) { for (final Map.Entry<String, Application> application : getInstance().applications.entrySet()) { for (final Map.Entry<String, String> urlPage : application.getValue().getUrlPages().entrySet()) { ...
[ "public", "static", "String", "getUrlByPagekey", "(", "String", "pageKey", ")", "{", "if", "(", "pageKey", "!=", "null", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "String", ",", "Application", ">", "application", ":", "getInstance", "(", "...
Get url name in a string by page key. @param pageKey is key of page @return url in a string
[ "Get", "url", "name", "in", "a", "string", "by", "page", "key", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Context.java#L745-L758
105,159
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Context.java
Context.getApplicationByPagekey
public static String getApplicationByPagekey(String pageKey) { if (pageKey != null) { for (final Map.Entry<String, Application> application : getInstance().applications.entrySet()) { for (final Map.Entry<String, String> urlPage : application.getValue().getUrlPages().entrySet()) { ...
java
public static String getApplicationByPagekey(String pageKey) { if (pageKey != null) { for (final Map.Entry<String, Application> application : getInstance().applications.entrySet()) { for (final Map.Entry<String, String> urlPage : application.getValue().getUrlPages().entrySet()) { ...
[ "public", "static", "String", "getApplicationByPagekey", "(", "String", "pageKey", ")", "{", "if", "(", "pageKey", "!=", "null", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "String", ",", "Application", ">", "application", ":", "getInstance", ...
Get application name in a string by page key. @param pageKey is key of page @return application name in a string
[ "Get", "application", "name", "in", "a", "string", "by", "page", "key", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Context.java#L767-L780
105,160
NoraUi/NoraUi
src/main/java/com/github/noraui/cli/NoraUiCommandLineInterface.java
NoraUiCommandLineInterface.isApplicationFound
private boolean isApplicationFound(String applicationName) { boolean applicationFinded = false; List<String> appList = application.get(); if (!appList.isEmpty()) { if (appList.contains(applicationName)) { applicationFinded = true; } else { ...
java
private boolean isApplicationFound(String applicationName) { boolean applicationFinded = false; List<String> appList = application.get(); if (!appList.isEmpty()) { if (appList.contains(applicationName)) { applicationFinded = true; } else { ...
[ "private", "boolean", "isApplicationFound", "(", "String", "applicationName", ")", "{", "boolean", "applicationFinded", "=", "false", ";", "List", "<", "String", ">", "appList", "=", "application", ".", "get", "(", ")", ";", "if", "(", "!", "appList", ".", ...
Is application found looking for if applicationName match with an existing application. @param applicationName is the name of the application you are looking for. @return true if applicationName match with an existing application.
[ "Is", "application", "found", "looking", "for", "if", "applicationName", "match", "with", "an", "existing", "application", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/cli/NoraUiCommandLineInterface.java#L870-L883
105,161
NoraUi/NoraUi
src/main/java/com/github/noraui/cli/Application.java
Application.remove
public void remove(String applicationName, Class<?> robotContext, boolean verbose) { logger.info("Remove application named [{}].", applicationName); removeApplicationPages(applicationName, robotContext, verbose); removeApplicationSteps(applicationName, robotContext, verbose); removeAppli...
java
public void remove(String applicationName, Class<?> robotContext, boolean verbose) { logger.info("Remove application named [{}].", applicationName); removeApplicationPages(applicationName, robotContext, verbose); removeApplicationSteps(applicationName, robotContext, verbose); removeAppli...
[ "public", "void", "remove", "(", "String", "applicationName", ",", "Class", "<", "?", ">", "robotContext", ",", "boolean", "verbose", ")", "{", "logger", ".", "info", "(", "\"Remove application named [{}].\"", ",", "applicationName", ")", ";", "removeApplicationPa...
Remove target application to your robot. @param applicationName name of application removed. @param robotContext Context class from robot. @param verbose boolean to activate verbose mode (show more traces).
[ "Remove", "target", "application", "to", "your", "robot", "." ]
5f491a3339c7d3c20d7207760bdaf2acdb8f260c
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/cli/Application.java#L104-L115
105,162
FXMisc/UndoFX
undofx/src/main/java/org/fxmisc/undo/impl/UndoManagerImpl.java
UndoManagerImpl.applyChange
private boolean applyChange(boolean isChangeAvailable, Supplier<C> changeToApply) { if (isChangeAvailable) { canMerge = false; // perform change C change = changeToApply.get(); this.expectedChange = change; performingAction.suspendWhile(() -> apply.ac...
java
private boolean applyChange(boolean isChangeAvailable, Supplier<C> changeToApply) { if (isChangeAvailable) { canMerge = false; // perform change C change = changeToApply.get(); this.expectedChange = change; performingAction.suspendWhile(() -> apply.ac...
[ "private", "boolean", "applyChange", "(", "boolean", "isChangeAvailable", ",", "Supplier", "<", "C", ">", "changeToApply", ")", "{", "if", "(", "isChangeAvailable", ")", "{", "canMerge", "=", "false", ";", "// perform change", "C", "change", "=", "changeToApply"...
Helper method for reducing code duplication @param isChangeAvailable same as `isUndoAvailable()` [Undo] or `isRedoAvailable()` [Redo] @param changeToApply same as `invert.apply(queue.prev())` [Undo] or `queue.next()` [Redo]
[ "Helper", "method", "for", "reducing", "code", "duplication" ]
5f9404a657e1dcfcd60bebee0aadef2f072dc2ab
https://github.com/FXMisc/UndoFX/blob/5f9404a657e1dcfcd60bebee0aadef2f072dc2ab/undofx/src/main/java/org/fxmisc/undo/impl/UndoManagerImpl.java#L206-L224
105,163
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java
SqsManager.pollQueue
public List<Message> pollQueue() { boolean success = false; ProgressStatus pollQueueStatus = new ProgressStatus(ProgressState.pollQueue, new BasicPollQueueInfo(0, success)); final Object reportObject = progressReporter.reportStart(pollQueueStatus); ReceiveMessageRequest request = new Re...
java
public List<Message> pollQueue() { boolean success = false; ProgressStatus pollQueueStatus = new ProgressStatus(ProgressState.pollQueue, new BasicPollQueueInfo(0, success)); final Object reportObject = progressReporter.reportStart(pollQueueStatus); ReceiveMessageRequest request = new Re...
[ "public", "List", "<", "Message", ">", "pollQueue", "(", ")", "{", "boolean", "success", "=", "false", ";", "ProgressStatus", "pollQueueStatus", "=", "new", "ProgressStatus", "(", "ProgressState", ".", "pollQueue", ",", "new", "BasicPollQueueInfo", "(", "0", "...
Poll SQS queue for incoming messages, filter them, and return a list of SQS Messages. @return a list of SQS messages.
[ "Poll", "SQS", "queue", "for", "incoming", "messages", "filter", "them", "and", "return", "a", "list", "of", "SQS", "Messages", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java#L113-L140
105,164
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java
SqsManager.parseMessage
public List<CloudTrailSource> parseMessage(List<Message> sqsMessages) { List<CloudTrailSource> sources = new ArrayList<>(); for (Message sqsMessage : sqsMessages) { boolean parseMessageSuccess = false; ProgressStatus parseMessageStatus = new ProgressStatus(ProgressState.parseMe...
java
public List<CloudTrailSource> parseMessage(List<Message> sqsMessages) { List<CloudTrailSource> sources = new ArrayList<>(); for (Message sqsMessage : sqsMessages) { boolean parseMessageSuccess = false; ProgressStatus parseMessageStatus = new ProgressStatus(ProgressState.parseMe...
[ "public", "List", "<", "CloudTrailSource", ">", "parseMessage", "(", "List", "<", "Message", ">", "sqsMessages", ")", "{", "List", "<", "CloudTrailSource", ">", "sources", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Message", "sqsMessage", "...
Given a list of raw SQS message parse each of them, and return a list of CloudTrailSource. @param sqsMessages list of SQS messages. @return list of CloudTrailSource.
[ "Given", "a", "list", "of", "raw", "SQS", "message", "parse", "each", "of", "them", "and", "return", "a", "list", "of", "CloudTrailSource", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java#L148-L176
105,165
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java
SqsManager.deleteMessageFromQueue
public void deleteMessageFromQueue(Message sqsMessage, ProgressStatus progressStatus) { final Object reportObject = progressReporter.reportStart(progressStatus); boolean deleteMessageSuccess = false; try { sqsClient.deleteMessage(new DeleteMessageRequest(config.getSqsUrl(), sqsMessag...
java
public void deleteMessageFromQueue(Message sqsMessage, ProgressStatus progressStatus) { final Object reportObject = progressReporter.reportStart(progressStatus); boolean deleteMessageSuccess = false; try { sqsClient.deleteMessage(new DeleteMessageRequest(config.getSqsUrl(), sqsMessag...
[ "public", "void", "deleteMessageFromQueue", "(", "Message", "sqsMessage", ",", "ProgressStatus", "progressStatus", ")", "{", "final", "Object", "reportObject", "=", "progressReporter", ".", "reportStart", "(", "progressStatus", ")", ";", "boolean", "deleteMessageSuccess...
Delete a message from the SQS queue that you specified in the configuration file. @param sqsMessage the {@link Message} that you want to delete. @param progressStatus {@link ProgressStatus} tracks the start and end status.
[ "Delete", "a", "message", "from", "the", "SQS", "queue", "that", "you", "specified", "in", "the", "configuration", "file", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java#L185-L195
105,166
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java
SqsManager.validate
private void validate() { LibraryUtils.checkArgumentNotNull(config, "configuration is null"); LibraryUtils.checkArgumentNotNull(exceptionHandler, "exceptionHandler is null"); LibraryUtils.checkArgumentNotNull(progressReporter, "progressReporter is null"); LibraryUtils.checkArgumentNotNul...
java
private void validate() { LibraryUtils.checkArgumentNotNull(config, "configuration is null"); LibraryUtils.checkArgumentNotNull(exceptionHandler, "exceptionHandler is null"); LibraryUtils.checkArgumentNotNull(progressReporter, "progressReporter is null"); LibraryUtils.checkArgumentNotNul...
[ "private", "void", "validate", "(", ")", "{", "LibraryUtils", ".", "checkArgumentNotNull", "(", "config", ",", "\"configuration is null\"", ")", ";", "LibraryUtils", ".", "checkArgumentNotNull", "(", "exceptionHandler", ",", "\"exceptionHandler is null\"", ")", ";", "...
Convenient function to validate input.
[ "Convenient", "function", "to", "validate", "input", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/SqsManager.java#L247-L253
105,167
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java
PropertiesFileConfiguration.loadProperty
private Properties loadProperty(String propertiesFile) { Properties prop = new Properties(); try { InputStream in = getClass().getResourceAsStream(propertiesFile); prop.load(in); in.close(); } catch (IOException e) { throw new IllegalStateException...
java
private Properties loadProperty(String propertiesFile) { Properties prop = new Properties(); try { InputStream in = getClass().getResourceAsStream(propertiesFile); prop.load(in); in.close(); } catch (IOException e) { throw new IllegalStateException...
[ "private", "Properties", "loadProperty", "(", "String", "propertiesFile", ")", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "try", "{", "InputStream", "in", "=", "getClass", "(", ")", ".", "getResourceAsStream", "(", "propertiesFile", ")...
Load properties from a classpath property file. @param propertiesFile the classpath properties file to read. @return a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html">Properties</a> object containing the properties set in the file.
[ "Load", "properties", "from", "a", "classpath", "property", "file", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java#L261-L271
105,168
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java
PropertiesFileConfiguration.getIntProperty
private int getIntProperty(Properties prop, String name) { String propertyValue = prop.getProperty(name); return Integer.parseInt(propertyValue); }
java
private int getIntProperty(Properties prop, String name) { String propertyValue = prop.getProperty(name); return Integer.parseInt(propertyValue); }
[ "private", "int", "getIntProperty", "(", "Properties", "prop", ",", "String", "name", ")", "{", "String", "propertyValue", "=", "prop", ".", "getProperty", "(", "name", ")", ";", "return", "Integer", ".", "parseInt", "(", "propertyValue", ")", ";", "}" ]
Convert a string representation of a property to an integer type. @param prop the {@link Properties} needs conversion. @param name a name to evaluate in the property file. @return an integer representation of the value associated with the property name.
[ "Convert", "a", "string", "representation", "of", "a", "property", "to", "an", "integer", "type", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java#L280-L283
105,169
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java
PropertiesFileConfiguration.getBooleanProperty
private Boolean getBooleanProperty(Properties prop, String name) { String propertyValue = prop.getProperty(name); return Boolean.parseBoolean(propertyValue); }
java
private Boolean getBooleanProperty(Properties prop, String name) { String propertyValue = prop.getProperty(name); return Boolean.parseBoolean(propertyValue); }
[ "private", "Boolean", "getBooleanProperty", "(", "Properties", "prop", ",", "String", "name", ")", "{", "String", "propertyValue", "=", "prop", ".", "getProperty", "(", "name", ")", ";", "return", "Boolean", ".", "parseBoolean", "(", "propertyValue", ")", ";",...
Convert a string representation of a property to a boolean type. @param prop the {@link Properties} needs conversion. @param name a name to evaluate in the property file. @return a boolean representation of the value associated with the property name.
[ "Convert", "a", "string", "representation", "of", "a", "property", "to", "a", "boolean", "type", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/configuration/PropertiesFileConfiguration.java#L292-L295
105,170
aws/aws-cloudtrail-processing-library
src/sample/SampleEventsProcessor.java
SampleEventsProcessor.validateEvent
private void validateEvent(CloudTrailEvent event) { if (event.getEventData().getAccountId() == null) { logger.error(String.format("Event %s doesn't have account ID.", event.getEventData())); } // more validation here... }
java
private void validateEvent(CloudTrailEvent event) { if (event.getEventData().getAccountId() == null) { logger.error(String.format("Event %s doesn't have account ID.", event.getEventData())); } // more validation here... }
[ "private", "void", "validateEvent", "(", "CloudTrailEvent", "event", ")", "{", "if", "(", "event", ".", "getEventData", "(", ")", ".", "getAccountId", "(", ")", "==", "null", ")", "{", "logger", ".", "error", "(", "String", ".", "format", "(", "\"Event %...
Do simple validation before processing. @param event to validate
[ "Do", "simple", "validation", "before", "processing", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/sample/SampleEventsProcessor.java#L42-L48
105,171
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java
EventReader.getSources
public List<CloudTrailSource> getSources() { List<Message> sqsMessages = sqsManager.pollQueue(); return sqsManager.parseMessage(sqsMessages); }
java
public List<CloudTrailSource> getSources() { List<Message> sqsMessages = sqsManager.pollQueue(); return sqsManager.parseMessage(sqsMessages); }
[ "public", "List", "<", "CloudTrailSource", ">", "getSources", "(", ")", "{", "List", "<", "Message", ">", "sqsMessages", "=", "sqsManager", ".", "pollQueue", "(", ")", ";", "return", "sqsManager", ".", "parseMessage", "(", "sqsMessages", ")", ";", "}" ]
Poll messages from SQS queue and convert messages to CloudTrailSource. @return a list of {@link CloudTrailSource}.
[ "Poll", "messages", "from", "SQS", "queue", "and", "convert", "messages", "to", "CloudTrailSource", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java#L111-L114
105,172
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java
EventReader.processSource
public void processSource (CloudTrailSource source) { boolean filterSourceOut = false; boolean downloadLogSuccess = true; boolean processSourceSuccess = false; ProgressStatus processSourceStatus = new ProgressStatus(ProgressState.processSource, new BasicProcessSourceInfo(source, process...
java
public void processSource (CloudTrailSource source) { boolean filterSourceOut = false; boolean downloadLogSuccess = true; boolean processSourceSuccess = false; ProgressStatus processSourceStatus = new ProgressStatus(ProgressState.processSource, new BasicProcessSourceInfo(source, process...
[ "public", "void", "processSource", "(", "CloudTrailSource", "source", ")", "{", "boolean", "filterSourceOut", "=", "false", ";", "boolean", "downloadLogSuccess", "=", "true", ";", "boolean", "processSourceSuccess", "=", "false", ";", "ProgressStatus", "processSourceSt...
Retrieve S3 object URL from source then downloads the object processes each event through call back functions. @param source {@link CloudTrailSource} to process.
[ "Retrieve", "S3", "object", "URL", "from", "source", "then", "downloads", "the", "object", "processes", "each", "event", "through", "call", "back", "functions", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java#L122-L186
105,173
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java
EventReader.deleteMessageAfterProcessSource
private void deleteMessageAfterProcessSource(ProgressState progressState, CloudTrailSource source) { ProgressStatus deleteMessageStatus = new ProgressStatus(progressState, new BasicProcessSourceInfo(source, false)); sqsManager.deleteMessageFromQueue(((SQSBasedSource)source).getSqsMessage(), deleteMessag...
java
private void deleteMessageAfterProcessSource(ProgressState progressState, CloudTrailSource source) { ProgressStatus deleteMessageStatus = new ProgressStatus(progressState, new BasicProcessSourceInfo(source, false)); sqsManager.deleteMessageFromQueue(((SQSBasedSource)source).getSqsMessage(), deleteMessag...
[ "private", "void", "deleteMessageAfterProcessSource", "(", "ProgressState", "progressState", ",", "CloudTrailSource", "source", ")", "{", "ProgressStatus", "deleteMessageStatus", "=", "new", "ProgressStatus", "(", "progressState", ",", "new", "BasicProcessSourceInfo", "(", ...
Delete SQS message after processing source. @param progressState {@link ProgressState} either {@link ProgressState#deleteMessage}, or {@link ProgressState#deleteFilteredMessage} @param source {@link CloudTrailSource} that contains the SQS message that will be deleted.
[ "Delete", "SQS", "message", "after", "processing", "source", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java#L194-L197
105,174
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/AWSCloudTrailProcessingExecutor.java
AWSCloudTrailProcessingExecutor.start
public void start() { logger.info("Started AWSCloudTrailProcessingLibrary."); validateBeforeStart(); scheduledThreadPool.scheduleAtFixedRate(new ScheduledJob(readerFactory), 0L, EXECUTION_DELAY, TimeUnit.MICROSECONDS); }
java
public void start() { logger.info("Started AWSCloudTrailProcessingLibrary."); validateBeforeStart(); scheduledThreadPool.scheduleAtFixedRate(new ScheduledJob(readerFactory), 0L, EXECUTION_DELAY, TimeUnit.MICROSECONDS); }
[ "public", "void", "start", "(", ")", "{", "logger", ".", "info", "(", "\"Started AWSCloudTrailProcessingLibrary.\"", ")", ";", "validateBeforeStart", "(", ")", ";", "scheduledThreadPool", ".", "scheduleAtFixedRate", "(", "new", "ScheduledJob", "(", "readerFactory", ...
Start processing AWS CloudTrail logs.
[ "Start", "processing", "AWS", "CloudTrail", "logs", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/AWSCloudTrailProcessingExecutor.java#L110-L114
105,175
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/AWSCloudTrailProcessingExecutor.java
AWSCloudTrailProcessingExecutor.validateBeforeStart
private void validateBeforeStart() { LibraryUtils.checkArgumentNotNull(config, "Configuration is null."); config.validate(); LibraryUtils.checkArgumentNotNull(sourceFilter, "sourceFilter is null."); LibraryUtils.checkArgumentNotNull(eventFilter, "eventFilter is null."); LibraryU...
java
private void validateBeforeStart() { LibraryUtils.checkArgumentNotNull(config, "Configuration is null."); config.validate(); LibraryUtils.checkArgumentNotNull(sourceFilter, "sourceFilter is null."); LibraryUtils.checkArgumentNotNull(eventFilter, "eventFilter is null."); LibraryU...
[ "private", "void", "validateBeforeStart", "(", ")", "{", "LibraryUtils", ".", "checkArgumentNotNull", "(", "config", ",", "\"Configuration is null.\"", ")", ";", "config", ".", "validate", "(", ")", ";", "LibraryUtils", ".", "checkArgumentNotNull", "(", "sourceFilte...
Validate the user's input before processing logs.
[ "Validate", "the", "user", "s", "input", "before", "processing", "logs", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/AWSCloudTrailProcessingExecutor.java#L195-L208
105,176
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/RawLogDeliveryEventSerializer.java
RawLogDeliveryEventSerializer.getMetadata
@Override public CloudTrailEventMetadata getMetadata(int charStart, int charEnd) { // Use Jackson getTokenLocation API only return the , (Comma) position, we need to advance to first open curly brace. String rawEvent = logFile.substring(charStart, charEnd+1); int offset = rawEvent.indexOf("{...
java
@Override public CloudTrailEventMetadata getMetadata(int charStart, int charEnd) { // Use Jackson getTokenLocation API only return the , (Comma) position, we need to advance to first open curly brace. String rawEvent = logFile.substring(charStart, charEnd+1); int offset = rawEvent.indexOf("{...
[ "@", "Override", "public", "CloudTrailEventMetadata", "getMetadata", "(", "int", "charStart", ",", "int", "charEnd", ")", "{", "// Use Jackson getTokenLocation API only return the , (Comma) position, we need to advance to first open curly brace.", "String", "rawEvent", "=", "logFil...
Find the raw event in string format from logFileContent based on character start index and end index.
[ "Find", "the", "raw", "event", "in", "string", "format", "from", "logFileContent", "based", "on", "character", "start", "index", "and", "end", "index", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/RawLogDeliveryEventSerializer.java#L42-L50
105,177
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.readArrayHeader
protected void readArrayHeader() throws IOException { if (jsonParser.nextToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Json object", jsonParser.getCurrentLocation()); } jsonParser.nextToken(); if (!jsonParser.getText().equals(RECORDS)) { ...
java
protected void readArrayHeader() throws IOException { if (jsonParser.nextToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Json object", jsonParser.getCurrentLocation()); } jsonParser.nextToken(); if (!jsonParser.getText().equals(RECORDS)) { ...
[ "protected", "void", "readArrayHeader", "(", ")", "throws", "IOException", "{", "if", "(", "jsonParser", ".", "nextToken", "(", ")", "!=", "JsonToken", ".", "START_OBJECT", ")", "{", "throw", "new", "JsonParseException", "(", "\"Not a Json object\"", ",", "jsonP...
Read the header of an AWS CloudTrail log. @throws JsonParseException if the log could not be parsed. @throws IOException if the log could not be opened or accessed.
[ "Read", "the", "header", "of", "an", "AWS", "CloudTrail", "log", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L76-L89
105,178
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.hasNextEvent
public boolean hasNextEvent() throws IOException { /* In Fasterxml parser, hasNextEvent will consume next token. So do not call it multiple times. */ JsonToken nextToken = jsonParser.nextToken(); return nextToken == JsonToken.START_OBJECT || nextToken == JsonToken.START_ARRAY; }
java
public boolean hasNextEvent() throws IOException { /* In Fasterxml parser, hasNextEvent will consume next token. So do not call it multiple times. */ JsonToken nextToken = jsonParser.nextToken(); return nextToken == JsonToken.START_OBJECT || nextToken == JsonToken.START_ARRAY; }
[ "public", "boolean", "hasNextEvent", "(", ")", "throws", "IOException", "{", "/* In Fasterxml parser, hasNextEvent will consume next token. So do not call it multiple times. */", "JsonToken", "nextToken", "=", "jsonParser", ".", "nextToken", "(", ")", ";", "return", "nextToken"...
Indicates whether the CloudTrail log has more events to read. @return <code>true</code> if the log contains more events; <code>false</code> otherwise. @throws IOException if the log could not be opened or accessed.
[ "Indicates", "whether", "the", "CloudTrail", "log", "has", "more", "events", "to", "read", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L97-L101
105,179
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.getNextEvent
public CloudTrailEvent getNextEvent() throws IOException { CloudTrailEventData eventData = new CloudTrailEventData(); String key; /* Get next CloudTrailEvent event from log file. When failed to parse a event, * IOException will be thrown. In this case, the charEnd index the place we ...
java
public CloudTrailEvent getNextEvent() throws IOException { CloudTrailEventData eventData = new CloudTrailEventData(); String key; /* Get next CloudTrailEvent event from log file. When failed to parse a event, * IOException will be thrown. In this case, the charEnd index the place we ...
[ "public", "CloudTrailEvent", "getNextEvent", "(", ")", "throws", "IOException", "{", "CloudTrailEventData", "eventData", "=", "new", "CloudTrailEventData", "(", ")", ";", "String", "key", ";", "/* Get next CloudTrailEvent event from log file. When failed to parse a event,\n ...
Get the next event from the CloudTrail log and parse it. @return a {@link CloudTrailEvent} that represents the parsed event. @throws IOException if the event could not be parsed.
[ "Get", "the", "next", "event", "from", "the", "CloudTrail", "log", "and", "parse", "it", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L119-L173
105,180
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.setAccountId
private void setAccountId(CloudTrailEventData eventData) { if (eventData.getRecipientAccountId() != null) { eventData.add("accountId", eventData.getRecipientAccountId()); return; } if (eventData.getUserIdentity() != null && eventData.getUserIdentity().getAcco...
java
private void setAccountId(CloudTrailEventData eventData) { if (eventData.getRecipientAccountId() != null) { eventData.add("accountId", eventData.getRecipientAccountId()); return; } if (eventData.getUserIdentity() != null && eventData.getUserIdentity().getAcco...
[ "private", "void", "setAccountId", "(", "CloudTrailEventData", "eventData", ")", "{", "if", "(", "eventData", ".", "getRecipientAccountId", "(", ")", "!=", "null", ")", "{", "eventData", ".", "add", "(", "\"accountId\"", ",", "eventData", ".", "getRecipientAccou...
Set AccountId in CloudTrailEventData top level from either recipientAccountID or from UserIdentity. If recipientAccountID exists then recipientAccountID is set to accountID; otherwise, accountID is retrieved from UserIdentity. There are 2 places accountID would appear in UserIdentity: first is the UserIdentity top lev...
[ "Set", "AccountId", "in", "CloudTrailEventData", "top", "level", "from", "either", "recipientAccountID", "or", "from", "UserIdentity", ".", "If", "recipientAccountID", "exists", "then", "recipientAccountID", "is", "set", "to", "accountID", ";", "otherwise", "accountID...
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L188-L207
105,181
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseReadOnly
private void parseReadOnly(CloudTrailEventData eventData) throws IOException { jsonParser.nextToken(); Boolean readOnly = null; if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) { readOnly = jsonParser.getBooleanValue(); } eventData.add(CloudTrailEventField.re...
java
private void parseReadOnly(CloudTrailEventData eventData) throws IOException { jsonParser.nextToken(); Boolean readOnly = null; if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) { readOnly = jsonParser.getBooleanValue(); } eventData.add(CloudTrailEventField.re...
[ "private", "void", "parseReadOnly", "(", "CloudTrailEventData", "eventData", ")", "throws", "IOException", "{", "jsonParser", ".", "nextToken", "(", ")", ";", "Boolean", "readOnly", "=", "null", ";", "if", "(", "jsonParser", ".", "getCurrentToken", "(", ")", "...
Parses the event readOnly attribute. @param eventData @throws JsonParseException @throws IOException
[ "Parses", "the", "event", "readOnly", "attribute", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L390-L397
105,182
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseManagementEvent
private void parseManagementEvent(CloudTrailEventData eventData) throws IOException { jsonParser.nextToken(); Boolean managementEvent = null; if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) { managementEvent = jsonParser.getBooleanValue(); } eventData.add(Cl...
java
private void parseManagementEvent(CloudTrailEventData eventData) throws IOException { jsonParser.nextToken(); Boolean managementEvent = null; if (jsonParser.getCurrentToken() != JsonToken.VALUE_NULL) { managementEvent = jsonParser.getBooleanValue(); } eventData.add(Cl...
[ "private", "void", "parseManagementEvent", "(", "CloudTrailEventData", "eventData", ")", "throws", "IOException", "{", "jsonParser", ".", "nextToken", "(", ")", ";", "Boolean", "managementEvent", "=", "null", ";", "if", "(", "jsonParser", ".", "getCurrentToken", "...
Parses the event managementEvent attribute. @param eventData the interesting {@link CloudTrailEventData} @throws IOException
[ "Parses", "the", "event", "managementEvent", "attribute", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L404-L411
105,183
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseResources
private void parseResources(CloudTrailEventData eventData) throws IOException { JsonToken nextToken = jsonParser.nextToken(); if (nextToken == JsonToken.VALUE_NULL) { eventData.add(CloudTrailEventField.resources.name(), null); return; } if (nextToken != JsonToken...
java
private void parseResources(CloudTrailEventData eventData) throws IOException { JsonToken nextToken = jsonParser.nextToken(); if (nextToken == JsonToken.VALUE_NULL) { eventData.add(CloudTrailEventField.resources.name(), null); return; } if (nextToken != JsonToken...
[ "private", "void", "parseResources", "(", "CloudTrailEventData", "eventData", ")", "throws", "IOException", "{", "JsonToken", "nextToken", "=", "jsonParser", ".", "nextToken", "(", ")", ";", "if", "(", "nextToken", "==", "JsonToken", ".", "VALUE_NULL", ")", "{",...
Parses a list of Resource. @param eventData the resources belong to @throws IOException
[ "Parses", "a", "list", "of", "Resource", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L419-L437
105,184
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseResource
private Resource parseResource() throws IOException { //current token is ready consumed by parseResources if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Resource object", jsonParser.getCurrentLocation()); } Resource resource...
java
private Resource parseResource() throws IOException { //current token is ready consumed by parseResources if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Resource object", jsonParser.getCurrentLocation()); } Resource resource...
[ "private", "Resource", "parseResource", "(", ")", "throws", "IOException", "{", "//current token is ready consumed by parseResources", "if", "(", "jsonParser", ".", "getCurrentToken", "(", ")", "!=", "JsonToken", ".", "START_OBJECT", ")", "{", "throw", "new", "JsonPar...
Parses a single Resource. @return a single resource @throws IOException
[ "Parses", "a", "single", "Resource", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L445-L464
105,185
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseDefaultValue
private String parseDefaultValue(String key) throws IOException { jsonParser.nextToken(); String value = null; JsonToken currentToken = jsonParser.getCurrentToken(); if (currentToken != JsonToken.VALUE_NULL) { if (currentToken == JsonToken.START_ARRAY || currentToken == JsonT...
java
private String parseDefaultValue(String key) throws IOException { jsonParser.nextToken(); String value = null; JsonToken currentToken = jsonParser.getCurrentToken(); if (currentToken != JsonToken.VALUE_NULL) { if (currentToken == JsonToken.START_ARRAY || currentToken == JsonT...
[ "private", "String", "parseDefaultValue", "(", "String", "key", ")", "throws", "IOException", "{", "jsonParser", ".", "nextToken", "(", ")", ";", "String", "value", "=", "null", ";", "JsonToken", "currentToken", "=", "jsonParser", ".", "getCurrentToken", "(", ...
Parses the event with key as default value. If the value is JSON null, then we will return null. If the value is JSON object (of starting with START_ARRAY or START_OBject) , then we will convert the object to String. If the value is JSON scalar value (non-structured object), then we will return simply return it as Str...
[ "Parses", "the", "event", "with", "key", "as", "default", "value", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L476-L489
105,186
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.parseAttributes
private Map<String, String> parseAttributes() throws IOException { if (jsonParser.nextToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Attributes object", jsonParser.getCurrentLocation()); } Map<String, String> attributes = new HashMap<>(); while (js...
java
private Map<String, String> parseAttributes() throws IOException { if (jsonParser.nextToken() != JsonToken.START_OBJECT) { throw new JsonParseException("Not a Attributes object", jsonParser.getCurrentLocation()); } Map<String, String> attributes = new HashMap<>(); while (js...
[ "private", "Map", "<", "String", ",", "String", ">", "parseAttributes", "(", ")", "throws", "IOException", "{", "if", "(", "jsonParser", ".", "nextToken", "(", ")", "!=", "JsonToken", ".", "START_OBJECT", ")", "{", "throw", "new", "JsonParseException", "(", ...
Parses attributes as a Map, used in both parseWebIdentitySessionContext and parseSessionContext @return attributes for either session context or web identity session context @throws IOException
[ "Parses", "attributes", "as", "a", "Map", "used", "in", "both", "parseWebIdentitySessionContext", "and", "parseSessionContext" ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L497-L511
105,187
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java
AbstractEventSerializer.convertToDate
private Date convertToDate(String dateInString) throws IOException { Date date = null; if (dateInString != null) { try { date = LibraryUtils.getUtcSdf().parse(dateInString); } catch (ParseException e) { throw new IOException("Cannot parse " + dateI...
java
private Date convertToDate(String dateInString) throws IOException { Date date = null; if (dateInString != null) { try { date = LibraryUtils.getUtcSdf().parse(dateInString); } catch (ParseException e) { throw new IOException("Cannot parse " + dateI...
[ "private", "Date", "convertToDate", "(", "String", "dateInString", ")", "throws", "IOException", "{", "Date", "date", "=", "null", ";", "if", "(", "dateInString", "!=", "null", ")", "{", "try", "{", "date", "=", "LibraryUtils", ".", "getUtcSdf", "(", ")", ...
This method convert a String to Date type. When parse error happened return current date. @param dateInString the String to convert to Date @return Date the date and time in coordinated universal time @throws IOException
[ "This", "method", "convert", "a", "String", "to", "Date", "type", ".", "When", "parse", "error", "happened", "return", "current", "date", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/serializer/AbstractEventSerializer.java#L530-L540
105,188
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java
LibraryUtils.endToProcess
public static void endToProcess(ProgressReporter progressReporter, boolean processSuccess, ProgressStatus progressStatus, Object reportObject) { progressStatus.getProgressInfo().setIsSuccess(processSuccess); progressReporter.reportEnd(progressStatus, reportObject); }
java
public static void endToProcess(ProgressReporter progressReporter, boolean processSuccess, ProgressStatus progressStatus, Object reportObject) { progressStatus.getProgressInfo().setIsSuccess(processSuccess); progressReporter.reportEnd(progressStatus, reportObject); }
[ "public", "static", "void", "endToProcess", "(", "ProgressReporter", "progressReporter", ",", "boolean", "processSuccess", ",", "ProgressStatus", "progressStatus", ",", "Object", "reportObject", ")", "{", "progressStatus", ".", "getProgressInfo", "(", ")", ".", "setIs...
A wrapper function of reporting the result of the processing. @param progressReporter the {@link ProgressReporter} to report the end of process. @param processSuccess the result of process. @param progressStatus the current progress status {@link ProgressStatus}. @param reportObject the object to send, usually the obje...
[ "A", "wrapper", "function", "of", "reporting", "the", "result", "of", "the", "processing", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java#L192-L195
105,189
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/factory/EventReaderFactory.java
EventReaderFactory.validate
private void validate() { LibraryUtils.checkArgumentNotNull(config, "Configuration is null."); LibraryUtils.checkArgumentNotNull(eventsProcessor, "Events Processor is null."); LibraryUtils.checkArgumentNotNull(sourceFilter, "Source Filter is null."); LibraryUtils.checkArgumentNotNull(eve...
java
private void validate() { LibraryUtils.checkArgumentNotNull(config, "Configuration is null."); LibraryUtils.checkArgumentNotNull(eventsProcessor, "Events Processor is null."); LibraryUtils.checkArgumentNotNull(sourceFilter, "Source Filter is null."); LibraryUtils.checkArgumentNotNull(eve...
[ "private", "void", "validate", "(", ")", "{", "LibraryUtils", ".", "checkArgumentNotNull", "(", "config", ",", "\"Configuration is null.\"", ")", ";", "LibraryUtils", ".", "checkArgumentNotNull", "(", "eventsProcessor", ",", "\"Events Processor is null.\"", ")", ";", ...
Validate input parameters.
[ "Validate", "input", "parameters", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/factory/EventReaderFactory.java#L137-L146
105,190
aws/aws-cloudtrail-processing-library
src/sample/SampleExceptionHandler.java
SampleExceptionHandler.handleException
@Override public void handleException(ProcessingLibraryException exception) { ProgressStatus status = exception.getStatus(); ProgressState state = status.getProgressState(); ProgressInfo info = status.getProgressInfo(); logger.error(String.format("Exception. Progress State: %s. Progr...
java
@Override public void handleException(ProcessingLibraryException exception) { ProgressStatus status = exception.getStatus(); ProgressState state = status.getProgressState(); ProgressInfo info = status.getProgressInfo(); logger.error(String.format("Exception. Progress State: %s. Progr...
[ "@", "Override", "public", "void", "handleException", "(", "ProcessingLibraryException", "exception", ")", "{", "ProgressStatus", "status", "=", "exception", ".", "getStatus", "(", ")", ";", "ProgressState", "state", "=", "status", ".", "getProgressState", "(", ")...
Exception handler that simply log progress state and progress information.
[ "Exception", "handler", "that", "simply", "log", "progress", "state", "and", "progress", "information", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/sample/SampleExceptionHandler.java#L33-L39
105,191
aws/aws-cloudtrail-processing-library
src/sample/SampleEventFilter.java
SampleEventFilter.filterEvent
@Override public boolean filterEvent(CloudTrailEvent event) throws CallbackException { CloudTrailEventData eventData = event.getEventData(); String eventSource = eventData.getEventSource(); String eventName = eventData.getEventName(); return eventSource.equals(EC2_EVENTS) && eventN...
java
@Override public boolean filterEvent(CloudTrailEvent event) throws CallbackException { CloudTrailEventData eventData = event.getEventData(); String eventSource = eventData.getEventSource(); String eventName = eventData.getEventName(); return eventSource.equals(EC2_EVENTS) && eventN...
[ "@", "Override", "public", "boolean", "filterEvent", "(", "CloudTrailEvent", "event", ")", "throws", "CallbackException", "{", "CloudTrailEventData", "eventData", "=", "event", ".", "getEventData", "(", ")", ";", "String", "eventSource", "=", "eventData", ".", "ge...
Event filter that only keep EC2 deletion API calls.
[ "Event", "filter", "that", "only", "keep", "EC2", "deletion", "API", "calls", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/sample/SampleEventFilter.java#L30-L38
105,192
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/CloudTrailEventData.java
CloudTrailEventData.getResources
@SuppressWarnings("unchecked") public List<Resource> getResources() { return (List<Resource>) get(CloudTrailEventField.resources.name()); }
java
@SuppressWarnings("unchecked") public List<Resource> getResources() { return (List<Resource>) get(CloudTrailEventField.resources.name()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "Resource", ">", "getResources", "(", ")", "{", "return", "(", "List", "<", "Resource", ">", ")", "get", "(", "CloudTrailEventField", ".", "resources", ".", "name", "(", ")", ")", ...
Get the resources used in the operation. @return A list of resources used in this operation.
[ "Get", "the", "resources", "used", "in", "the", "operation", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/CloudTrailEventData.java#L229-L232
105,193
aws/aws-cloudtrail-processing-library
src/sample/SampleSourceFilter.java
SampleSourceFilter.filterSource
@Override public boolean filterSource(CloudTrailSource source) throws CallbackException { source = (SQSBasedSource) source; Map<String, String> sourceAttributes = source.getSourceAttributes(); String accountId = sourceAttributes.get(SourceAttributeKeys.ACCOUNT_ID.getAttributeKey()); ...
java
@Override public boolean filterSource(CloudTrailSource source) throws CallbackException { source = (SQSBasedSource) source; Map<String, String> sourceAttributes = source.getSourceAttributes(); String accountId = sourceAttributes.get(SourceAttributeKeys.ACCOUNT_ID.getAttributeKey()); ...
[ "@", "Override", "public", "boolean", "filterSource", "(", "CloudTrailSource", "source", ")", "throws", "CallbackException", "{", "source", "=", "(", "SQSBasedSource", ")", "source", ";", "Map", "<", "String", ",", "String", ">", "sourceAttributes", "=", "source...
This Sample Source Filter filter out messages that have been received more than 3 times and accountIDs in a certain range. It is useful when you only want to retry on failed message up to certain times.
[ "This", "Sample", "Source", "Filter", "filter", "out", "messages", "that", "have", "been", "received", "more", "than", "3", "times", "and", "accountIDs", "in", "a", "certain", "range", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/sample/SampleSourceFilter.java#L50-L60
105,194
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/WebIdentitySessionContext.java
WebIdentitySessionContext.getAttributes
@SuppressWarnings({ "unchecked", "rawtypes" }) public Map<String, String> getAttributes() { return (Map) this.get(CloudTrailEventField.attributes.name()); }
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public Map<String, String> getAttributes() { return (Map) this.get(CloudTrailEventField.attributes.name()); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "Map", "<", "String", ",", "String", ">", "getAttributes", "(", ")", "{", "return", "(", "Map", ")", "this", ".", "get", "(", "CloudTrailEventField", ".", "attribu...
Get attributes. @return additional web identity session contest attributes.
[ "Get", "attributes", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/WebIdentitySessionContext.java#L38-L41
105,195
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java
S3Manager.downloadLog
public byte[] downloadLog(CloudTrailLog ctLog, CloudTrailSource source) { boolean success = false; ProgressStatus downloadLogStatus = new ProgressStatus(ProgressState.downloadLog, new BasicProcessLogInfo(source, ctLog, success)); final Object downloadSourceReportObject = progressReporter.reportS...
java
public byte[] downloadLog(CloudTrailLog ctLog, CloudTrailSource source) { boolean success = false; ProgressStatus downloadLogStatus = new ProgressStatus(ProgressState.downloadLog, new BasicProcessLogInfo(source, ctLog, success)); final Object downloadSourceReportObject = progressReporter.reportS...
[ "public", "byte", "[", "]", "downloadLog", "(", "CloudTrailLog", "ctLog", ",", "CloudTrailSource", "source", ")", "{", "boolean", "success", "=", "false", ";", "ProgressStatus", "downloadLogStatus", "=", "new", "ProgressStatus", "(", "ProgressState", ".", "downloa...
Downloads an AWS CloudTrail log from the specified source. @param ctLog The {@link CloudTrailLog} to download @param source The {@link CloudTrailSource} to download the log from. @return A byte array containing the log data.
[ "Downloads", "an", "AWS", "CloudTrail", "log", "from", "the", "specified", "source", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java#L74-L100
105,196
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java
S3Manager.getObject
public S3Object getObject(String bucketName, String objectKey) { try { return s3Client.getObject(bucketName, objectKey); } catch (AmazonServiceException e) { logger.error("Failed to get object " + objectKey + " from s3 bucket " + bucketName); throw e; } }
java
public S3Object getObject(String bucketName, String objectKey) { try { return s3Client.getObject(bucketName, objectKey); } catch (AmazonServiceException e) { logger.error("Failed to get object " + objectKey + " from s3 bucket " + bucketName); throw e; } }
[ "public", "S3Object", "getObject", "(", "String", "bucketName", ",", "String", "objectKey", ")", "{", "try", "{", "return", "s3Client", ".", "getObject", "(", "bucketName", ",", "objectKey", ")", ";", "}", "catch", "(", "AmazonServiceException", "e", ")", "{...
Download an S3 object. @param bucketName The S3 bucket name from which to download the object. @param objectKey The S3 key name of the object to download. @return The downloaded <a href="http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/S3Object.html">S3Object</a>.
[ "Download", "an", "S3", "object", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java#L110-L117
105,197
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java
S3Manager.validate
private void validate() { LibraryUtils.checkArgumentNotNull(config, "configuration is null"); LibraryUtils.checkArgumentNotNull(exceptionHandler, "exceptionHandler is null"); LibraryUtils.checkArgumentNotNull(progressReporter, "progressReporter is null"); LibraryUtils.checkArgumentNotNul...
java
private void validate() { LibraryUtils.checkArgumentNotNull(config, "configuration is null"); LibraryUtils.checkArgumentNotNull(exceptionHandler, "exceptionHandler is null"); LibraryUtils.checkArgumentNotNull(progressReporter, "progressReporter is null"); LibraryUtils.checkArgumentNotNul...
[ "private", "void", "validate", "(", ")", "{", "LibraryUtils", ".", "checkArgumentNotNull", "(", "config", ",", "\"configuration is null\"", ")", ";", "LibraryUtils", ".", "checkArgumentNotNull", "(", "exceptionHandler", ",", "\"exceptionHandler is null\"", ")", ";", "...
Validates input parameters.
[ "Validates", "input", "parameters", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/manager/S3Manager.java#L122-L127
105,198
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/SourceIdentifier.java
SourceIdentifier.identifyWithEventName
public SourceType identifyWithEventName(String source, String eventName) { if (eventName.startsWith(CREATE_EVENT_PREFIX)) { return getCloudTrailSourceType(source); } return SourceType.Other; }
java
public SourceType identifyWithEventName(String source, String eventName) { if (eventName.startsWith(CREATE_EVENT_PREFIX)) { return getCloudTrailSourceType(source); } return SourceType.Other; }
[ "public", "SourceType", "identifyWithEventName", "(", "String", "source", ",", "String", "eventName", ")", "{", "if", "(", "eventName", ".", "startsWith", "(", "CREATE_EVENT_PREFIX", ")", ")", "{", "return", "getCloudTrailSourceType", "(", "source", ")", ";", "}...
Identify the source type with event action. @param source the S3 object name @param eventName the event name defined by Amazon S3. @return {@link SourceType}
[ "Identify", "the", "source", "type", "with", "event", "action", "." ]
411315808d8d3dc6b45e4182212e3e04d82e3782
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/SourceIdentifier.java#L38-L43
105,199
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/db/ResultSetResult.java
ResultSetResult.resultSetTypeToSqlLite
public static int resultSetTypeToSqlLite(int columnType) { int type; switch (columnType) { case Types.INTEGER: case Types.BIGINT: case Types.SMALLINT: case Types.TINYINT: case Types.BOOLEAN: type = ResultUtils.FIELD_TYPE_INTEGER; break; case Types.VARCHAR: case Types.DATE: type = ResultUtil...
java
public static int resultSetTypeToSqlLite(int columnType) { int type; switch (columnType) { case Types.INTEGER: case Types.BIGINT: case Types.SMALLINT: case Types.TINYINT: case Types.BOOLEAN: type = ResultUtils.FIELD_TYPE_INTEGER; break; case Types.VARCHAR: case Types.DATE: type = ResultUtil...
[ "public", "static", "int", "resultSetTypeToSqlLite", "(", "int", "columnType", ")", "{", "int", "type", ";", "switch", "(", "columnType", ")", "{", "case", "Types", ".", "INTEGER", ":", "case", "Types", ".", "BIGINT", ":", "case", "Types", ".", "SMALLINT",...
Get the SQLite type from the ResultSetMetaData column type @param columnType column type @return SQLite type
[ "Get", "the", "SQLite", "type", "from", "the", "ResultSetMetaData", "column", "type" ]
889bffb5d18330a3f4bd89443acf7959ebe3a376
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/db/ResultSetResult.java#L341-L374