idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
13,300 | 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 c... | Previous tollfree bill |
13,301 | 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 ... | Add a public web access to your conference |
13,302 | 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 ) ; } | List old phones archived as they were not returned after an RMA |
13,303 | 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 > ( ) ; addBo... | Used to overwrite current billing account feature by the billing account site |
13,304 | 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 conve... | Get the allowed creditThreshold for this billing account |
13,305 | 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 ( q... | Create a new screen list rule |
13,306 | 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 < Strin... | Schedule a conversion to line |
13,307 | 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 ) ; H... | Change the feature type of the phone number |
13,308 | 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/{serviceNa... | Create a new time condition rule |
13,309 | 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 ( ... | Delete the given screen list |
13,310 | 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 , serviceN... | Schedule a new rate code for this sva |
13,311 | 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 ) ; Strin... | Compatible rate codes related to this value added service |
13,312 | 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 = pa... | Create a new custom status |
13,313 | 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 ) ... | Create a new time condition for an extension |
13,314 | 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... | Create a new rule for an extension |
13,315 | public OvhOvhPabxDialplanExtension billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_POST ( String billingAccount , String serviceName , Long dialplanId , Boolean enable , Long position , OvhSchedulerCategoryEnum schedulerCategory , OvhOvhPabxDialplanExtensionConditionScreenListTypeEnum screenListType ) ... | Create a new extension for a dialplan |
13,316 | 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 , dial... | Delete the given dialplan |
13,317 | 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... | Create a new dialplan |
13,318 | 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/{service... | Create a new menu entry |
13,319 | 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 , billingAcc... | Delete the given menu entry |
13,320 | 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 s... | Create a new menu |
13,321 | 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 < S... | Create a new text to speech |
13,322 | 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 , billingAc... | Upload a new sound for a specific greeting . Return a task id . |
13,323 | 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... | Change the voicemail on a new version to manager greetings directories and extra settings . |
13,324 | 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 , billingAcco... | Voicemail directory messages |
13,325 | 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 ( qPat... | Move the message to another directory |
13,326 | 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 =... | Get a url to download the sound file |
13,327 | 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 , serviceNam... | Change the voicemail password . It must be 4 digit |
13,328 | 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 = ... | External displayed number creation for a given trunk |
13,329 | 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 , se... | Delete an external displayed number for a given trunk |
13,330 | 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" ; ... | Generate a phone call for validation . Returned validation code should be typed when asked . |
13,331 | 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 ... | Transfer security deposit between two billing accounts |
13,332 | 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"... | Operations on a telephony service s offer |
13,333 | 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 ) ; H... | Add an outplan notification on the billing account |
13,334 | 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 ... | Ask for a new repayment |
13,335 | 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 < St... | Change the destination of the DDI |
13,336 | 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 ... | Get all available accessories |
13,337 | 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 ) ; } | Search a service with its domain to get its billing account and type |
13,338 | 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 ( qPat... | Get all available geographic zone with some details from a country |
13,339 | 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"... | Get all available specific number from a country |
13,340 | 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" , ... | Get city informations from a zip code |
13,341 | 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 ... | Get all zip codes compatible for a number |
13,342 | 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 ) ; S... | Create a new sound |
13,343 | 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 ... | Get all available phone brands compatible with lines |
13,344 | 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 ) ; } | Get all available fax offer compatible |
13,345 | 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 , "... | Replace the phone by its spare . The broken phone became a spare if it was bought . An RMA is created if the broken phone is under securitydeposit . |
13,346 | 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 ) ; } | Get all available spare brands |
13,347 | 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 . typeNameToModelSourcesM... | Removes all resource models originating from the given bundle from this registry . |
13,348 | 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 < ? > , ResourceModelMetadataHo... | Removes the metadata of all models contained in the provided bundle from the registrar . |
13,349 | private static boolean isPropertyType ( Class < ? > type ) { return type . isPrimitive ( ) || type == String . class || type == Date . class || type == Calendar . class || ClassUtils . wrapperToPrimitive ( type ) != null ; } | Whether a property cannot be represented by a resource but must stem from a value map representing the properties of a resource . |
13,350 | 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 ) ; } } | Removes the given value from all collections stored under any key . |
13,351 | public void onOsgiApplicationEvent ( OsgiBundleApplicationContextEvent event ) { if ( event instanceof OsgiBundleContextFailedEvent ) { final Bundle bundle = event . getBundle ( ) ; handleStop ( bundle ) ; stop ( bundle ) ; } } | This method is executed asynchronously since the original extender thread may try to obtain a lock to the OSGi framework s registry state during the stop while holding the event handling lock which may result in a transitive deadlock . |
13,352 | 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 . dispatcherServlet . disableMvc ( bun... | We must guarantee the order in which the event is consumed by the collaborators since subsequent operations may depend on the resulting state . |
13,353 | public static < K , T extends Collection < K > > Collection < K > instantiateCollectionType ( Class < T > collectionType ) { return instantiateCollectionType ( collectionType , DEFAULT_COLLECTION_SIZE ) ; } | Creates an instance with a default capacity . |
13,354 | 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 ) ; while ( ! classes .... | All methods of the given type its super types and interfaces starting with the methods of the given type . |
13,355 | public ResourceModelStatistics countMappingDuration ( int durationInMs ) { for ( int i = 0 ; i < this . indexBoundaries . length ; ++ i ) { if ( durationInMs < this . indexBoundaries [ i ] ) { ++ this . mappingDurationFrequencies [ i ] ; return this ; } } ++ this . mappingDurationFrequencies [ this . mappingDurationFre... | Adds the mapping with the duration to the statistics . |
13,356 | 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." ) ; } String [ ] result = new... | Appends the given String to all elements of the given array . |
13,357 | 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 , default... | Creates a Temporal object filling the missing fields of the provided time with default values . |
13,358 | 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 .... | Use this method to export Contentful spaces into sqlite3 databases which can be imported later . |
13,359 | public static String generateSetupJavaScript ( List < String > prefixes ) { Map < String , String > webJars = new WebJarAssetLocator ( ) . getWebJars ( ) ; return generateSetupJavaScript ( prefixes , webJars ) ; } | Returns the JavaScript that is used to setup the RequireJS config . This value is not cached . |
13,360 | 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 . en... | Returns the JSON used to setup the RequireJS config for each WebJar in the CLASSPATH . This value is not cached . |
13,361 | 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" ; } | A generic error message for when the RequireJS config could not be parsed out of the WebJar s pom . xml meta - data . |
13,362 | public static String getWebJarConfig ( Map . Entry < String , String > webJar ) { String webJarConfig = "" ; String filename = WebJarAssetLocator . WEBJARS_PATH_PREFIX + "/" + webJar . getKey ( ) + "/" + webJar . getValue ( ) + "/" + "webjars-requirejs.js" ; InputStream inputStream = RequireJS . class . getClassLoader ... | The legacy webJars - requirejs . js based RequireJS config for a WebJar . |
13,363 | @ SuppressWarnings ( "unchecked" ) public static < E extends Enum < ? extends Style . HasCssName > > E fromStyleName ( final String styleName , final Class < E > enumClass , final E defaultValue ) { if ( styleName == null || enumClass == null ) { return defaultValue ; } for ( final Enum < ? extends Style . HasCssName >... | Returns first enum constant found in at space - separated list of style names . |
13,364 | public static SimpleRadioButton wrap ( Element element ) { assert Document . get ( ) . getBody ( ) . isOrHasChild ( element ) ; SimpleRadioButton radioButton = new SimpleRadioButton ( InputElement . as ( element ) ) ; radioButton . onAttach ( ) ; RootPanel . detachOnWindowClose ( radioButton ) ; return radioButton ; } | Creates a SimpleRadioButton widget that wraps an existing < ; input type = radio > ; element . |
13,365 | 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 ; } | Creates the error list . |
13,366 | private void ensureId ( final Element element ) { final String id = element . getId ( ) ; if ( id == null || id . isEmpty ( ) ) { element . setId ( Document . get ( ) . createUniqueId ( ) ) ; } } | Ensures the given element has a non - empty id . |
13,367 | public static void setHiddenOn ( final UIObject uiObject , final DeviceSize deviceSize ) { final String [ ] deviceString = deviceSize . name ( ) . split ( "_" ) ; for ( final String device : deviceString ) { final DeviceSize size = DeviceSize . valueOf ( device ) ; switch ( size ) { case PRINT : addEnumStyleName ( uiOb... | Sets the ui object to be hidden on the device size |
13,368 | public static void setVisibleOn ( final UIObject uiObject , final DeviceSize deviceSize ) { final String [ ] deviceString = deviceSize . name ( ) . split ( "_" ) ; for ( final String device : deviceString ) { final DeviceSize size = DeviceSize . valueOf ( device ) ; switch ( size ) { case PRINT : addEnumStyleName ( uiO... | Sets the ui object to be visible on the device size |
13,369 | public static ScrollSpy scrollSpy ( final UIObject spyOn , final String selector ) { return new ScrollSpy ( spyOn . getElement ( ) , selector ) ; } | Attaches ScrollSpy to specified object with specified target selector . |
13,370 | public static ScrollSpy scrollSpy ( final UIObject spyOn , final HasId target ) { return new ScrollSpy ( spyOn . getElement ( ) , target ) ; } | Attaches ScrollSpy to specified object with specified target element . |
13,371 | 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 ) ; } } | Sets the icon type . If the icon type changes programatically then the icon is removed from the dom and recreated . |
13,372 | public static SimpleCheckBox wrap ( Element element ) { assert Document . get ( ) . getBody ( ) . isOrHasChild ( element ) ; SimpleCheckBox checkBox = new SimpleCheckBox ( InputElement . as ( element ) ) ; checkBox . onAttach ( ) ; RootPanel . detachOnWindowClose ( checkBox ) ; return checkBox ; } | Creates a SimpleCheckBox widget that wraps an existing < ; input type = checkbox > ; element . |
13,373 | private void call ( final Element e , final String arg ) { JQuery . jQuery ( e ) . popover ( arg ) ; } | Call the native popover method with the given argument . |
13,374 | private void popover ( Element e , String content ) { e . setAttribute ( "data-content" , content ) ; JQuery . jQuery ( e ) . popover ( ) ; } | Create the popover . |
13,375 | public void setAttribute ( final String attributeName , final String attributeValue ) { uiObject . getElement ( ) . setAttribute ( attributeName , attributeValue ) ; } | Sets the attribute on the UiObject |
13,376 | private void updatePaginationState ( final SimplePager pager ) { for ( int i = 0 ; i < getWidgetCount ( ) ; i ++ ) { if ( i == 0 ) { ( ( AnchorListItem ) getWidget ( i ) ) . setEnabled ( pager . hasPreviousPage ( ) ) ; } else if ( i == getWidgetCount ( ) - 1 ) { ( ( AnchorListItem ) getWidget ( i ) ) . setEnabled ( pag... | This updates the current active page and the enabled state of the previous and next buttons in the Pagination based on the state of the given SimplePager . |
13,377 | public void insert ( final Widget child , final int beforeIndex ) { insert ( child , ( Element ) getElement ( ) , beforeIndex , true ) ; } | Inserts a widget at a specific index |
13,378 | 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 ( ) { public void onValidatio... | Adds a field to the group . |
13,379 | 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 false ; } | Removes a field from the validation group . |
13,380 | public void setSize ( final ColumnSize firstSize , final ColumnSize ... otherSizes ) { addEnumVarargsValues ( new ColumnSize [ ] { firstSize } , ColumnSize . class , true ) ; addEnumVarargsValues ( otherSizes , ColumnSize . class , false ) ; } | Adds one or more additional column sizes . |
13,381 | 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 HasOneWidget ) { children = getR... | Gets the radio children . |
13,382 | protected void updateChildren ( ) { for ( Radio child : getRadioChildren ( ) ) { HandlerRegistration reg = valueChangedRegistrations . get ( child ) ; if ( reg == null ) { valueChangedRegistrations . put ( child , child . addValueChangeHandler ( changeHandler ) ) ; } child . setName ( name ) ; } } | Update the radio children names . |
13,383 | private void call ( final Element e , final String arg ) { JQuery . jQuery ( e ) . tooltip ( arg ) ; } | Call the native tooltip method with the given argument . |
13,384 | 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 ) ; } } } | Convenience method that will set the name of all child widgets that can have a name |
13,385 | 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 ; } else { lastWithVa... | In order to handle steps being added all at once this method determines allows methods to opperator correctly if |
13,386 | public void syntaxError ( String state , String event , List < String > legalEvents , String uri , Integer line ) { formatter . syntaxError ( state , event , legalEvents , uri , line ) ; } | Not part of the API . Used for testing only . |
13,387 | public JCodeModel getCodeModel ( String basePackage , String schemaLocation , Annotator annotator ) { if ( type != null ) { return codeModel ; } else { return SchemaHelper . buildBodyJCodeModel ( schemaLocation , basePackage , name , schema , annotator ) ; } } | Builds a JCodeModel for this body |
13,388 | 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 LinkedH... | This method will extract a set of controllers from the RAML file . These controllers will contain the metadata required by the code generator including name any annotations as well as conatining methods |
13,389 | private Set < ApiResourceMetadata > checkResource ( JCodeModel bodyCodeModel , String baseUrl , RamlResource resource , ApiResourceMetadata controller , RamlRoot document ) { Set < ApiResourceMetadata > controllers = new LinkedHashSet < > ( ) ; String url = baseUrl + resource . getRelativeUri ( ) ; if ( controller == n... | Recursive method to parse resources in a Raml File . It tries to go as deep as possible before creating the root Resource . Once this is done methods and child resources will be relative to the root resource |
13,390 | private Set < String > getAllReferencedTypeNames ( Set < ApiResourceMetadata > controllers ) { Set < String > parametersNames = controllers . stream ( ) . flatMap ( resourceMetadata -> resourceMetadata . getParameters ( ) . stream ( ) ) . map ( apiParameter -> StringUtils . capitalize ( apiParameter . getName ( ) ) ) .... | Fetches all referenced type names so as to not generate classes multiple times |
13,391 | public static RamlRoot loadRamlFromFile ( String ramlFileUrl ) { try { return createRamlModelFactoryFor ( ramlFileUrl ) . buildRamlRoot ( ramlFileUrl ) ; } catch ( NullPointerException npe ) { logger . error ( "File not found at {}" , ramlFileUrl ) ; return null ; } } | Loads a RAML document from a file . This method will |
13,392 | private boolean doesActionTypeSupportRequestBody ( RamlActionType target ) { return target . equals ( RamlActionType . POST ) || target . equals ( RamlActionType . PUT ) || target . equals ( RamlActionType . PATCH ) || target . equals ( RamlActionType . DELETE ) ; } | Method to check if a specific action type supports payloads in the body of the request |
13,393 | 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 ( ) ... | Utility method that will return a schema if the identifier is valid and exists in the raml file definition . |
13,394 | 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 ) { th... | Maps simple types supported by RAML into primitives and other simple Java types |
13,395 | 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 ; } int idIdx = schema . indexOf ( "\"" + searchString + "\"" , startIdx ) ; int ... | Extracts the value of a specified parameter in a schema |
13,396 | 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 ) { con... | Builds a JCodeModel for classes that will be used as Request or Response bodies |
13,397 | public static GenerationConfig getGenerationConfig ( Boolean generateBuilders , Boolean includeAdditionalProperties , Boolean includeDynamicAccessors , Boolean useLongIntegers ) { return new DefaultGenerationConfig ( ) { public boolean isGenerateBuilders ( ) { if ( generateBuilders != null ) { return generateBuilders ;... | Returns a generation config with the supplied parameters . If any of these parameters are supplied null it will use the value defined in the default configuration |
13,398 | public static String getElementAsString ( JDeclaration type ) { StringBuilder builder = new StringBuilder ( ) ; JFormatter jFormatter = new JFormatter ( new StringBuilderWriter ( builder ) ) ; type . declare ( jFormatter ) ; return builder . toString ( ) ; } | Returns the string equivalent of the code model element |
13,399 | 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 ( ) ) ; } i... | Adds validation annotations to the supplied method |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.