Exports a LUIS application to JSON format.

@param appId The application ID.
@param versionId The version ID.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the LuisApp object
558857
public Observable<LuisApp> exportAsync(UUID appId, String versionId) {
        return exportWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<LuisApp>, LuisApp>() {
            @Override
            public LuisApp call(ServiceResponse<LuisApp> response) {
                return response.body();
            }
        });
    }
1155753
public Observable<ServiceResponse<ApplicationInfoResponse>> getWithServiceResponseAsync(UUID appId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.get(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInfoResponse>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationInfoResponse>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationInfoResponse> clientResponse = getDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
1328530
@Override
    public String getEntityDefinitionJson(String guid) throws AtlasException {
        guid = ParamChecker.notEmpty(guid, "entity id");

        final ITypedReferenceableInstance instance = repository.getEntityDefinition(guid);
        return InstanceSerialization.toJson(instance, true);
    }
762705
private Map<String, EntityMetadata> getEntityMetadataCol(ApplicationMetadata appMetadata, String persistenceUnit)
    {
        Metamodel metaModel = appMetadata.getMetamodel(persistenceUnit);
        Map<String, EntityMetadata> entityMetadataMap = ((MetamodelImpl) metaModel).getEntityMetadataMap();
        return entityMetadataMap;
    }
697649
public Observable<ServiceResponse<ApplicationSettings>> getSettingsWithServiceResponseAsync(UUID appId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.getSettings(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationSettings>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationSettings>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationSettings> clientResponse = getSettingsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
353937
@Override
    public AppVersion getCurrentAppVersion() {
        return new AppVersion(getSequenceNumber()).setReleaseName(getReleaseName()).setTimestamp(getTimestamp())
                .setNumClasses(getProjectStats().getNumClasses()).setCodeSize(getProjectStats().getCodeSize());
    }
736087
public static Object getSpringBean(ApplicationContext appContext, String id) {
        try {
            Object bean = appContext.getBean(id);
            return bean;
        } catch (BeansException e) {
            return null;
        }
    }
111624
@Export
	public Map createMap(String applicationId, String mapId, String elementId) {
		Map map = getMap(applicationId, mapId);
		if (map == null) {
			MapWidget mapWidget = new MapWidget(mapId, applicationId);
			map = new MapImpl(mapWidget);
			Element element = DOM.getElementById(elementId);
			if (element != null) {
				int width = element.getClientWidth();
				int height = element.getClientHeight();
				map.setSize(width, height);
				map.setHtmlElementId(elementId);
			}
			registerMap(mapId, applicationId, map);
		} else {
			((MapImpl) map).getMapWidget().redraw();
		}
		return map;
	}
1358178
public Observable<ServiceResponse<ListEnvironmentsResponseInner>> listEnvironmentsWithServiceResponseAsync(String userName, String labId) {
        if (userName == null) {
            throw new IllegalArgumentException("Parameter userName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        ListEnvironmentsPayload listEnvironmentsPayload = new ListEnvironmentsPayload();
        listEnvironmentsPayload.withLabId(labId);
        return service.listEnvironments(userName, this.client.apiVersion(), this.client.acceptLanguage(), listEnvironmentsPayload, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ListEnvironmentsResponseInner>>>() {
                @Override
                public Observable<ServiceResponse<ListEnvironmentsResponseInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ListEnvironmentsResponseInner> clientResponse = listEnvironmentsDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
59671
private Api getApiInternal(String apiOrgId, String apiId, String apiVersion) {
        String key = getApiIndex(apiOrgId, apiId, apiVersion);
        Api api;
        synchronized (mutex) {
            api = (Api) getMap().get(key);
        }
        return api;
    }
376083
public static function getApiKeyByAppId($id)
    {
        if (!empty($id)) {
            // use local app caching
            $key = static::getCachedInfo($id, 'api_key', null);
            if (!is_null($key)) {
                static::setApiKeyToAppId($key, $id);

                return $key;
            }
        }

        return null;
    }
202511
public Observable<VersionInfo> getAsync(UUID appId, String versionId) {
        return getWithServiceResponseAsync(appId, versionId).map(new Func1<ServiceResponse<VersionInfo>, VersionInfo>() {
            @Override
            public VersionInfo call(ServiceResponse<VersionInfo> response) {
                return response.body();
            }
        });
    }
1284511
public static function fetchByContentObjectVersion( $contentObjectId, $version )
    {
        $contentObjectVersion = eZContentObjectVersion::fetchVersion( $version, $contentObjectId );
        if ( $contentObjectVersion instanceof eZContentObjectVersion )
        {
            $return = self::fetchByContentVersionId( $contentObjectVersion->attribute( 'id' ) );
            return $return;
        }
        else
        {
            return false;
        }
    }
1138236
@Override
	public Response createApplication( Application app ) {

		this.logger.fine( "Request: create application " + app + "." );
		Response result;
		try {
			String tplName = app.getTemplate() == null ? null : app.getTemplate().getName();
			String tplQualifier = app.getTemplate() == null ? null : app.getTemplate().getVersion();
			String appName = app.getDisplayName() != null ? app.getDisplayName() : app.getName();
			ManagedApplication ma = this.manager.applicationMngr().createApplication( appName, app.getDescription(), tplName, tplQualifier );
			result = Response.ok().entity( ma.getApplication()).build();

		} catch( InvalidApplicationException e ) {
			result = handleError(
					Status.NOT_FOUND,
					new RestError( REST_MNGMT_INVALID_TPL, e, application( app )),
					lang( this.manager )).build();

		} catch( AlreadyExistingException e ) {
			result = handleError(
					Status.FORBIDDEN,
					new RestError( REST_MNGMT_CONFLICT, e, application( app )),
					lang( this.manager )).build();

		} catch( IOException e ) {
			result = handleError(
					Status.UNAUTHORIZED,
					new RestError( REST_SAVE_ERROR, e, application( app )),
					lang( this.manager )).build();
		}

		return result;
	}
280352
static String getAppVersion(Context context) {
        String appVersion = "";
        if (context != null) {
            try {
                final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                appVersion = packageInfo.versionName;
            } catch (Exception e) {
                PrefHelper.LogException("Error obtaining AppVersion", e);
            }
        }
        return (TextUtils.isEmpty(appVersion) ? BLANK : appVersion);
    }
53862
public function getMethod($routeId, $version, $method)
    {
        if ($version == '*' || empty($version)) {
            $version = $this->methodTable->getLatestVersion($routeId);
        } else {
            $version = $this->methodTable->getVersion($routeId, $version);
        }

        if (empty($version)) {
            throw new StatusCode\UnsupportedMediaTypeException('Version does not exist');
        }

        return $this->methodTable->getMethod($routeId, $version, $method);
    }
942945
public static BaasResult<JsonObject> fetchDataSync(String id){
        if (id == null) throw new IllegalArgumentException("asset id cannot be null");
        BaasBox box = BaasBox.getDefaultChecked();
        AssetDataRequest req = new AssetDataRequest(box,id, RequestOptions.DEFAULT,null);
        return box.submitSync(req);
    }