code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public ArrayList<Date> billingAccount_historyTollfreeConsumption_GET(String billingAccount) throws IOException {
String qPath = "/telephony/{billingAccount}/historyTollfreeConsumption";
StringBuilder sb = path(qPath, billingAccount);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, ... | java |
public OvhConferenceWebAccess billingAccount_conference_serviceName_webAccess_POST(String billingAccount, String serviceName, OvhConferenceWebAccessTypeEnum type) throws IOException {
String qPath = "/telephony/{billingAccount}/conference/{serviceName}/webAccess";
StringBuilder sb = path(qPath, billingAccount, serv... | java |
public ArrayList<OvhPhone> billingAccount_oldPhone_GET(String billingAccount) throws IOException {
String qPath = "/telephony/{billingAccount}/oldPhone";
StringBuilder sb = path(qPath, billingAccount);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t16);
} | java |
public void billingAccount_billingAccountSite_POST(String billingAccount, String billingAccountSite) throws IOException {
String qPath = "/telephony/{billingAccount}/billingAccountSite";
StringBuilder sb = path(qPath, billingAccount);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "billing... | java |
public ArrayList<OvhPrice> billingAccount_allowedCreditThreshold_GET(String billingAccount) throws IOException {
String qPath = "/telephony/{billingAccount}/allowedCreditThreshold";
StringBuilder sb = path(qPath, billingAccount);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t17)... | java |
public void billingAccount_screen_serviceName_screenLists_POST(String billingAccount, String serviceName, String callNumber, OvhScreenListNatureEnum nature, OvhScreenListTypeEnum type) throws IOException {
String qPath = "/telephony/{billingAccount}/screen/{serviceName}/screenLists";
StringBuilder sb = path(qPath, ... | java |
public OvhOfferTask billingAccount_number_serviceName_convertToLine_POST(String billingAccount, String serviceName, String offer) throws IOException {
String qPath = "/telephony/{billingAccount}/number/{serviceName}/convertToLine";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMap<String, Objec... | java |
public OvhTask billingAccount_number_serviceName_changeFeatureType_POST(String billingAccount, String serviceName, OvhTypeEnum featureType) throws IOException {
String qPath = "/telephony/{billingAccount}/number/{serviceName}/changeFeatureType";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMap... | java |
public OvhTimeCondition billingAccount_timeCondition_serviceName_condition_POST(String billingAccount, String serviceName, OvhTimeConditionsDayEnum day, String hourBegin, String hourEnd, OvhTimeConditionsPolicyEnum policy) throws IOException {
String qPath = "/telephony/{billingAccount}/timeCondition/{serviceName}/co... | java |
public void billingAccount_timeCondition_serviceName_condition_id_DELETE(String billingAccount, String serviceName, Long id) throws IOException {
String qPath = "/telephony/{billingAccount}/timeCondition/{serviceName}/condition/{id}";
StringBuilder sb = path(qPath, billingAccount, serviceName, id);
exec(qPath, "D... | java |
public OvhDetailedRateCodeInformation billingAccount_rsva_serviceName_scheduleRateCode_POST(String billingAccount, String serviceName, String rateCode) throws IOException {
String qPath = "/telephony/{billingAccount}/rsva/{serviceName}/scheduleRateCode";
StringBuilder sb = path(qPath, billingAccount, serviceName);
... | java |
public ArrayList<OvhRateCodeInformation> billingAccount_rsva_serviceName_allowedRateCodes_GET(String billingAccount, String serviceName) throws IOException {
String qPath = "/telephony/{billingAccount}/rsva/{serviceName}/allowedRateCodes";
StringBuilder sb = path(qPath, billingAccount, serviceName);
String resp =... | java |
public OvhOvhPabxCustomStatus billingAccount_ovhPabx_serviceName_hunting_customStatus_POST(String billingAccount, String serviceName, String color, String description, String name) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/customStatus";
StringBuilder sb = path(q... | java |
public OvhOvhPabxDialplanExtensionConditionTime billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionTime_POST(String billingAccount, String serviceName, Long dialplanId, Long extensionId, Date timeFrom, Date timeTo, OvhOvhPabxDialplanExtensionConditionTimeWeekDayEnum weekDay) throws IO... | java |
public OvhOvhPabxDialplanExtensionRule billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_rule_POST(String billingAccount, String serviceName, Long dialplanId, Long extensionId, OvhOvhPabxDialplanExtensionRuleActionEnum action, String actionParam, Boolean negativeAction, Long position) throws ... | java |
public OvhOvhPabxDialplanExtension billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST(String billingAccount, String serviceName, Long dialplanId, Boolean enable, Long position, OvhSchedulerCategoryEnum schedulerCategory, OvhOvhPabxDialplanExtensionConditionScreenListTypeEnum screenListType) throws IO... | java |
public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_DELETE(String billingAccount, String serviceName, Long dialplanId) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}";
StringBuilder sb = path(qPath, billingAccount, serviceName, dialplanId)... | java |
public OvhOvhPabxDialplan billingAccount_ovhPabx_serviceName_dialplan_POST(String billingAccount, String serviceName, Boolean anonymousRejection, String name, OvhOvhPabxDialplanNumberPresentationEnum showCallerNumber, Long transferTimeout) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serv... | java |
public OvhOvhPabxMenuEntry billingAccount_ovhPabx_serviceName_menu_menuId_entry_POST(String billingAccount, String serviceName, Long menuId, OvhOvhPabxIvrMenuEntryActionEnum action, String actionParam, String dtmf, Long position) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/m... | java |
public void billingAccount_ovhPabx_serviceName_menu_menuId_entry_entryId_DELETE(String billingAccount, String serviceName, Long menuId, Long entryId) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}/entry/{entryId}";
StringBuilder sb = path(qPath, billingAccount, ... | java |
public OvhOvhPabxMenu billingAccount_ovhPabx_serviceName_menu_POST(String billingAccount, String serviceName, Long greetSound, Long greetSoundTts, Long invalidSound, Long invalidSoundTts, String name) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu";
StringBuilder sb = pa... | java |
public void billingAccount_ovhPabx_serviceName_tts_POST(String billingAccount, String serviceName, String text, OvhOvhPabxTtsVoiceEnum voice) throws IOException {
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/tts";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMap<String, Ob... | java |
public Long billingAccount_voicemail_serviceName_greetings_POST(String billingAccount, String serviceName, OvhVoicemailMessageFolderGreetingEnum dir, String documentId) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/greetings";
StringBuilder sb = path(qPath, billingAccount,... | java |
public void billingAccount_voicemail_serviceName_migrateOnNewVersion_POST(String billingAccount, String serviceName) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/migrateOnNewVersion";
StringBuilder sb = path(qPath, billingAccount, serviceName);
exec(qPath, "POST", sb.to... | java |
public ArrayList<Long> billingAccount_voicemail_serviceName_directories_GET(String billingAccount, String serviceName, OvhVoicemailMessageFolderDirectoryEnum dir) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories";
StringBuilder sb = path(qPath, billingAccount, ser... | java |
public void billingAccount_voicemail_serviceName_directories_id_move_POST(String billingAccount, String serviceName, Long id, OvhVoicemailMessageFolderDirectoryEnum dir) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}/move";
StringBuilder sb = path(qPath, bi... | java |
public OvhPcsFile billingAccount_voicemail_serviceName_directories_id_download_GET(String billingAccount, String serviceName, Long id, OvhServiceVoicemailAudioFormatEnum format) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}/download";
StringBuilder sb = pa... | java |
public void billingAccount_voicemail_serviceName_settings_changePassword_POST(String billingAccount, String serviceName, String password) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/settings/changePassword";
StringBuilder sb = path(qPath, billingAccount, serviceName);
... | java |
public OvhTrunkExternalDisplayedNumber billingAccount_trunk_serviceName_externalDisplayedNumber_POST(String billingAccount, String serviceName, Boolean autoValidation, String number) throws IOException {
String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber";
StringBuilder sb = pat... | java |
public void billingAccount_trunk_serviceName_externalDisplayedNumber_number_DELETE(String billingAccount, String serviceName, String number) throws IOException {
String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}";
StringBuilder sb = path(qPath, billingAccount, serviceN... | java |
public OvhTrunkExternalDisplayedNumberValidation billingAccount_trunk_serviceName_externalDisplayedNumber_number_validate_POST(String billingAccount, String serviceName, String number) throws IOException {
String qPath = "/telephony/{billingAccount}/trunk/{serviceName}/externalDisplayedNumber/{number}/validate";
St... | java |
public void billingAccount_transferSecurityDeposit_POST(String billingAccount, Long amount, String billingAccountDestination) throws IOException {
String qPath = "/telephony/{billingAccount}/transferSecurityDeposit";
StringBuilder sb = path(qPath, billingAccount);
HashMap<String, Object>o = new HashMap<String, Ob... | java |
public ArrayList<Long> billingAccount_offerTask_GET(String billingAccount, OvhOfferTaskActionEnum action, OvhTaskStatusEnum status, OvhOfferTaskTypeEnum type) throws IOException {
String qPath = "/telephony/{billingAccount}/offerTask";
StringBuilder sb = path(qPath, billingAccount);
query(sb, "action", action);
... | java |
public OvhConsumptionThreshold billingAccount_outplanNotification_POST(String billingAccount, OvhOutplanNotificationBlockEnum block, String notifyEmail, Double percentage) throws IOException {
String qPath = "/telephony/{billingAccount}/outplanNotification";
StringBuilder sb = path(qPath, billingAccount);
HashMap... | java |
public OvhHistoryRepaymentConsumption billingAccount_historyRepaymentConsumption_POST(String billingAccount, String billingNumber) throws IOException {
String qPath = "/telephony/{billingAccount}/historyRepaymentConsumption";
StringBuilder sb = path(qPath, billingAccount);
HashMap<String, Object>o = new HashMap<S... | java |
public OvhTask billingAccount_ddi_serviceName_changeDestination_POST(String billingAccount, String serviceName, String destination) throws IOException {
String qPath = "/telephony/{billingAccount}/ddi/{serviceName}/changeDestination";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMap<String, Ob... | java |
public ArrayList<OvhAccessoryOffer> accessories_GET(OvhNumberCountryEnum country) throws IOException {
String qPath = "/telephony/accessories";
StringBuilder sb = path(qPath);
query(sb, "country", country);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t19);
} | java |
public ArrayList<OvhTelephonySearchService> searchServices_GET(String axiom) throws IOException {
String qPath = "/telephony/searchServices";
StringBuilder sb = path(qPath);
query(sb, "axiom", axiom);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t20);
} | java |
public ArrayList<OvhNumberDetailedZone> number_detailedZones_GET(String axiom, OvhNumberCountryEnum country) throws IOException {
String qPath = "/telephony/number/detailedZones";
StringBuilder sb = path(qPath);
query(sb, "axiom", axiom);
query(sb, "country", country);
String resp = execN(qPath, "GET", sb.toS... | java |
public ArrayList<OvhSpecificNumber> number_specificNumbers_GET(OvhNumberCountryEnum country, String range, OvhNumberTypeEnum type, String zone) throws IOException {
String qPath = "/telephony/number/specificNumbers";
StringBuilder sb = path(qPath);
query(sb, "country", country);
query(sb, "range", range);
que... | java |
public ArrayList<OvhCity> directories_cities_GET(OvhNumberCountryEnum country, String zipCode) throws IOException {
String qPath = "/telephony/directories/cities";
StringBuilder sb = path(qPath);
query(sb, "country", country);
query(sb, "zipCode", zipCode);
String resp = execN(qPath, "GET", sb.toString(), nul... | java |
public ArrayList<String> directories_availableZipCodes_GET(OvhNumberCountryEnum country, String number) throws IOException {
String qPath = "/telephony/directories/availableZipCodes";
StringBuilder sb = path(qPath);
query(sb, "country", country);
query(sb, "number", number);
String resp = execN(qPath, "GET", ... | java |
public OvhSound sounds_POST(String description, String filename) throws IOException {
String qPath = "/telephony/sounds";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "description", description);
addBody(o, "filename", filename);
String resp = exec(qPa... | java |
public ArrayList<OvhLinePhone> line_offer_phones_GET(OvhNumberCountryEnum country, String offer) throws IOException {
String qPath = "/telephony/line/offer/phones";
StringBuilder sb = path(qPath);
query(sb, "country", country);
query(sb, "offer", offer);
String resp = execN(qPath, "GET", sb.toString(), null);... | java |
public ArrayList<OvhLineOffer> fax_offers_GET(OvhNumberCountryEnum country) throws IOException {
String qPath = "/telephony/fax/offers";
StringBuilder sb = path(qPath);
query(sb, "country", country);
String resp = execN(qPath, "GET", sb.toString(), null);
return convertTo(resp, t15);
} | java |
public void spare_spare_replace_POST(String spare, String domain, String ip) throws IOException {
String qPath = "/telephony/spare/{spare}/replace";
StringBuilder sb = path(qPath, spare);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "domain", domain);
addBody(o, "ip", ip);
exec(qPath... | java |
public ArrayList<String> spare_brands_GET() throws IOException {
String qPath = "/telephony/spare/brands";
StringBuilder sb = path(qPath);
String resp = execN(qPath, "GET", sb.toString(), null);
return convertTo(resp, t4);
} | java |
void removeResourceModels(final Bundle bundle) {
this.logger.info("Removing resource models of bundle " + displayNameOf(bundle) + "...");
MatchedBundlesPredicate sourcesWithBundles = new MatchedBundlesPredicate(bundle);
for (Collection<OsgiModelSource<?>> values : this.typeNameToModelSourcesMap.... | java |
public synchronized void removeMetadataForModelsIn(Bundle bundle) {
if (bundle == null) {
throw new IllegalArgumentException("method parameter bundle must not be null");
}
Map<Class<?>, ResourceModelMetadataHolder> newCache = copyCache();
Iterator<Map.Entry<Class<?>, Resourc... | java |
private static boolean isPropertyType(Class<?> type) {
return type.isPrimitive() ||
type == String.class ||
type == Date.class ||
type == Calendar.class ||
ClassUtils.wrapperToPrimitive(type) != null;
} | java |
public void removeValue(V value) {
if (value == null) {
throw new IllegalArgumentException("Method argument value must not be null.");
}
for (Collection<V> values : values()) {
values.remove(value);
}
} | java |
@Override
@Async
public void onOsgiApplicationEvent(OsgiBundleApplicationContextEvent event) {
// We need to use the generic OsgiBundleApplicationContextEvent here and test
// for instanceof since gemini-blueprint does not correctly determine
// the event type we are listening for.
... | java |
void handleStop(Bundle bundle) {
if (bundle == null) {
throw new IllegalArgumentException("Method argument bundle must not be null.");
}
this.logger.info("Removing infrastructure for bundle: " + bundle + "...");
this.modelRegistrar.unregister(bundle);
this.di... | java |
public static <K, T extends Collection<K>> Collection<K> instantiateCollectionType(Class<T> collectionType) {
return instantiateCollectionType(collectionType, DEFAULT_COLLECTION_SIZE);
} | java |
public static List<Method> methodsOf(Class<?> type) {
if (type == null) {
throw new IllegalArgumentException("Method argument type must not be null");
}
List<Method> methods = new LinkedList<>();
Queue<Class<?>> classes = new LinkedList<>();
classes.add(type);
... | java |
public ResourceModelStatistics countMappingDuration(int durationInMs) {
// The right-hand interval boundaries are pre-calculated. We start at the smallest (1) of the
// interval [0, 1). Thus, when our value is less than the boundary, we know it is in the current interval (i),
// as the right-han... | java |
public static String[] appendToAll(String append, String[] appendTo) {
if (append == null) {
throw new IllegalArgumentException("Method argument append must not be null.");
}
if (appendTo == null) {
throw new IllegalArgumentException("Method argument to must not be null."... | java |
public static ChronoZonedDateTime zonedTime(final Object target, final ZoneId defaultZoneId) {
Validate.notNull(target, "Target cannot be null");
Validate.notNull(defaultZoneId, "ZoneId cannot be null");
if (target instanceof Instant) {
return ZonedDateTime.ofInstant((Instant) target... | java |
public boolean export(Context context, Class<?> spaceClass, String accessToken) {
successful = false;
final SpaceHelper helper = crateSpaceHelper(spaceClass);
final String outputPath = createOutputPath(helper);
final CountDownLatch countDownLatch = new CountDownLatch(1);
final Vault vault = Vault.... | java |
public static String generateSetupJavaScript(List<String> prefixes) {
Map<String, String> webJars = new WebJarAssetLocator().getWebJars();
return generateSetupJavaScript(prefixes, webJars);
} | java |
public static Map<String, ObjectNode> generateSetupJson(List<Map.Entry<String, Boolean>> prefixes) {
Map<String, String> webJars = new WebJarAssetLocator().getWebJars();
Map<String, ObjectNode> jsonConfigs = new HashMap<>();
for (Map.Entry<String, String> webJar : webJars.entrySet()) {
... | java |
private static String requireJsConfigErrorMessage(Map.Entry<String, String> webJar) {
return "Could not read WebJar RequireJS config for: " + webJar.getKey() + " " + webJar.getValue() + "\n" +
"Please file a bug at: http://github.com/webjars/" + webJar.getKey() + "/issues/new";
} | java |
@Deprecated
public static String getWebJarConfig(Map.Entry<String, String> webJar) {
String webJarConfig = "";
// read the webJarConfigs
String filename = WebJarAssetLocator.WEBJARS_PATH_PREFIX + "/" + webJar.getKey() + "/" + webJar.getValue() + "/" + "webjars-requirejs.js";
InputSt... | java |
@SuppressWarnings("unchecked")
public static <E extends Enum<? extends Style.HasCssName>> E fromStyleName(final String styleName,
final Class<E> enumClass,
fi... | java |
public static SimpleRadioButton wrap(Element element) {
// Assert that the element is attached.
assert Document.get().getBody().isOrHasChild(element);
SimpleRadioButton radioButton = new SimpleRadioButton(InputElement.as(element));
// Mark it attached and remember it for cleanup.
... | java |
public List<EditorError> createErrorList(Editor<T> editor, T value, String messageKey) {
List<EditorError> result = new ArrayList<EditorError>();
result.add(new BasicEditorError(editor, value, getInvalidMessage(messageKey)));
return result;
} | java |
private void ensureId(final Element element) {
final String id = element.getId();
if (id == null || id.isEmpty()) {
element.setId(Document.get().createUniqueId());
}
} | java |
public static void setHiddenOn(final UIObject uiObject,
final DeviceSize deviceSize) {
// Split the enum up by _ to get the different devices
// Separates the SM_MD into [SM, MD] so we can add the right styles
final String[] deviceString = deviceSize.name().spl... | java |
public static void setVisibleOn(final UIObject uiObject,
final DeviceSize deviceSize) {
// Split the enum up by _ to get the different devices
// Separates the SM_MD into [SM, MD] so we can add the right styles
final String[] deviceString = deviceSize.name().s... | java |
public static ScrollSpy scrollSpy(final UIObject spyOn, final String selector) {
return new ScrollSpy(spyOn.getElement(), selector);
} | java |
public static ScrollSpy scrollSpy(final UIObject spyOn, final HasId target) {
return new ScrollSpy(spyOn.getElement(), target);
} | java |
public void setIconType(IconType type) {
IconType prevType = iconType;
iconType = type;
if (iconType != prevType && iconElement != null) {
iconElement.removeFromParent();
iconElement = null;
DomEvent.fireNativeEvent(Document.get().createChangeEvent(), this);
... | java |
public static SimpleCheckBox wrap(Element element) {
// Assert that the element is attached.
assert Document.get().getBody().isOrHasChild(element);
SimpleCheckBox checkBox = new SimpleCheckBox(InputElement.as(element));
// Mark it attached and remember it for cleanup.
checkBox.... | java |
private void call(final Element e, final String arg) {
JQuery.jQuery(e).popover(arg);
} | java |
private void popover(Element e, String content) {
e.setAttribute("data-content", content);
JQuery.jQuery(e).popover();
} | java |
public void setAttribute(final String attributeName, final String attributeValue) {
uiObject.getElement().setAttribute(attributeName, attributeValue);
} | java |
private void updatePaginationState(final SimplePager pager) {
for (int i = 0; i < getWidgetCount(); i++) {
if (i == 0) { //previous button
((AnchorListItem)getWidget(i)).setEnabled(pager.hasPreviousPage());
}
else if (i == getWidgetCount() - 1) { //next butto... | java |
public void insert(final Widget child, final int beforeIndex) {
insert(child, (Element) getElement(), beforeIndex, true);
} | java |
public <T extends Widget & HasValidators<?>> void add(final T field) {
fields.put(field, field.validate(false));
if (field.isAttached()) {
updateStateAndNotify();
}
registrations.put(field, field.addValidationChangedHandler(new ValidationChangedHandler() {
@Overri... | java |
public <T extends Widget & HasValidators<?>> boolean remove(final T field) {
fields.remove((HasValidators<?>) field);
HandlerRegistration reg = registrations.remove((HasValidators<?>) field);
if (reg != null) {
reg.removeHandler();
return true;
}
return fa... | java |
public void setSize(final ColumnSize firstSize, final ColumnSize... otherSizes) {
addEnumVarargsValues(new ColumnSize[]{firstSize}, ColumnSize.class, true);
addEnumVarargsValues(otherSizes, ColumnSize.class, false);
} | java |
protected Set<Radio> getRadioChildren(final Widget widget, final Set<Radio> c) {
Set<Radio> children = c;
if (children == null) {
children = new HashSet<Radio>();
}
if (widget instanceof Radio) {
children.add((Radio) widget);
} else if (widget instanceof H... | java |
protected void updateChildren() {
for (Radio child : getRadioChildren()) {
HandlerRegistration reg = valueChangedRegistrations.get(child);
if (reg == null) {
valueChangedRegistrations.put(child, child.addValueChangeHandler(changeHandler));
}
child.... | java |
private void call(final Element e, final String arg) {
JQuery.jQuery(e).tooltip(arg);
} | java |
@Override
public void setName(final String name) {
this.name = name;
if (name == null) {
return;
}
for (final Widget w : getChildren()) {
if (w instanceof HasName) {
((HasName) w).setName(name);
}
}
} | java |
private Map getCurrentStep(Phase phase) {
String target = phase.ordinal() <= Phase.match.ordinal()?Phase.match.name():Phase.result.name();
Map lastWithValue = null;
for (Map stepOrHook : getSteps()) {
if (stepOrHook.get(target) == null) {
return stepOrHook;
}... | java |
public void syntaxError(String state, String event, List<String> legalEvents, String uri, Integer line) {
formatter.syntaxError(state, event, legalEvents, uri, line);
} | java |
public JCodeModel getCodeModel(String basePackage, String schemaLocation, Annotator annotator) {
if (type != null) {
return codeModel;
} else {
return SchemaHelper.buildBodyJCodeModel(schemaLocation, basePackage, name, schema, annotator);
}
} | java |
public Set<ApiResourceMetadata> extractControllers(JCodeModel bodyCodeModel, RamlRoot raml) {
Set<ApiResourceMetadata> controllers = new LinkedHashSet<>();
if (raml == null) {
return controllers;
}
if (bodyCodeModel == null) {
bodyCodeModel = new JCodeModel();
}
Set<String> names = new LinkedHashSet... | java |
private Set<ApiResourceMetadata> checkResource(JCodeModel bodyCodeModel, String baseUrl, RamlResource resource,
ApiResourceMetadata controller, RamlRoot document) {
Set<ApiResourceMetadata> controllers = new LinkedHashSet<>();
// append resource URL to url.
String url = baseUrl + resource.getRelativeUri();
i... | java |
private Set<String> getAllReferencedTypeNames(Set<ApiResourceMetadata> controllers) {
// TODO Add nested objects as well. For now only the top level objects
// are included
Set<String> parametersNames = controllers.stream().flatMap(resourceMetadata -> resourceMetadata.getParameters().stream())
.map(apiParamet... | java |
public static RamlRoot loadRamlFromFile(String ramlFileUrl) {
try {
return createRamlModelFactoryFor(ramlFileUrl).buildRamlRoot(ramlFileUrl);
} catch (NullPointerException npe) {
logger.error("File not found at {}", ramlFileUrl);
return null;
}
} | java |
private boolean doesActionTypeSupportRequestBody(RamlActionType target) {
return target.equals(RamlActionType.POST) || target.equals(RamlActionType.PUT) || target.equals(RamlActionType.PATCH)
|| target.equals(RamlActionType.DELETE);
} | java |
public static String resolveSchema(String schema, RamlRoot document) {
if (document == null || schema == null || schema.indexOf("{") != -1) {
return null;
}
if (document.getSchemas() != null && !document.getSchemas().isEmpty()) {
for (Map<String, String> map : document.getSchemas()) {
if (map.containsKe... | java |
public static Class<?> mapSimpleType(RamlParamType param, String format, String rawType) {
switch (param) {
case BOOLEAN:
return Boolean.class;
case DATE:
return mapDateFormat(rawType);
case INTEGER: {
Class<?> fromFormat = mapNumberFromFormat(format);
if (fromFormat == Double.class) {
... | java |
private static String extractTopItem(String searchString, String schema, int startIdx) {
String extracted = null;
int propIdx = schema.indexOf("\"properties\"", startIdx);
if (propIdx == -1) {
propIdx = Integer.MAX_VALUE;
}
// check for second
int idIdx = schema.indexOf("\"" + searchString + "\"", startI... | java |
public static JCodeModel buildBodyJCodeModel(String basePackage, String schemaLocation, String name, String schema,
Annotator annotator) {
JCodeModel codeModel = new JCodeModel();
SchemaStore schemaStore = new SchemaStore();
GenerationConfig config = Config.getPojoConfig();
if (config == null) {
config =... | java |
public static GenerationConfig getGenerationConfig(Boolean generateBuilders, Boolean includeAdditionalProperties,
Boolean includeDynamicAccessors, Boolean useLongIntegers) {
return new DefaultGenerationConfig() {
@Override
public boolean isGenerateBuilders() { // set config option by
// overrid... | java |
public static String getElementAsString(JDeclaration type) {
StringBuilder builder = new StringBuilder();
JFormatter jFormatter = new JFormatter(new StringBuilderWriter(builder));
type.declare(jFormatter);
return builder.toString();
} | java |
public void annotateFieldJSR303(JMethod getter, boolean addValidAnnotation) {
if (isRequired()) {
getter.annotate(NotNull.class);
}
if (StringUtils.hasText(getPattern())) {
JAnnotationUse annotation = getter.annotate(Pattern.class);
annotation.param("regexp", getPattern());
}
if (getMinLength() != nu... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.