Uses of Class
org.opencastproject.util.data.Option
Packages that use Option
Package
Description
Service implementation classes
Utility classes for dealing with media packages, collections, URLs, files, and streams.
-
Uses of Option in org.opencastproject.mediapackage
Methods in org.opencastproject.mediapackage that return OptionModifier and TypeMethodDescriptionMediaPackageSupport.sanityCheck(MediaPackage mp) Basic sanity checking for media packages. -
Uses of Option in org.opencastproject.serviceregistry.api
Fields in org.opencastproject.serviceregistry.api with type parameters of type OptionModifier and TypeFieldDescriptionstatic final Function<org.apache.http.HttpResponse, Option<List<MediaPackageElement>>> RemoteBase.elementsFromHttpResponseMethods in org.opencastproject.serviceregistry.api that return OptionModifier and TypeMethodDescriptionprotected <A> Option<A> RemoteBase.runRequest(org.apache.http.client.methods.HttpRequestBase req, Function<org.apache.http.HttpResponse, A> f) -
Uses of Option in org.opencastproject.storage
Methods in org.opencastproject.storage that return OptionModifier and TypeMethodDescriptionStorageUsage.getTotalSpace()Gets the total space of storage in BytesStorageUsage.getUsableSpace()Gets the available space of storage in Bytes This is free storage that is not reservedStorageUsage.getUsedSpace()Gets the used space of storage in Bytes -
Uses of Option in org.opencastproject.util
Fields in org.opencastproject.util with type parameters of type OptionModifier and TypeFieldDescriptionJobUtil.jobFromHttpResponseMimeTypeUtil.suffixMimeType.getSuffix()as a function.Methods in org.opencastproject.util that return OptionModifier and TypeMethodDescription<A> Option<A> Apply functionfonly if no other thread currently applies a function using this needle eye.IoSupport.classPathResourceAsFile(String resource) Get a classpath resource as a file using the class loader ofIoSupport.MimeType.getDescription()Returns the mime type description.MimeType.getFlavor()Returns the flavor of this mime type.MimeType.getFlavorDescription()Returns the flavor description.OsgiUtil.getOptCfg(Dictionary d, String key) Get a value from a dictionary.OsgiUtil.getOptCfgAsBoolean(Dictionary d, String key) Get an optional boolean from a dictionary.OsgiUtil.getOptCfgAsInt(Dictionary d, String key) Get a value from a dictionary.OsgiUtil.getOptContextProperty(org.osgi.service.component.ComponentContext cc, String key) Get an optional, non-blank value from the bundle context.MimeType.getSuffix()Returns the main suffix for this mime type, that identifies files containing data of this flavor.IoSupport.loadFileFromClassPathAsString(String resource) Load a classpath resource into a string using the class loader ofIoSupport.IoSupport.loadFileFromClassPathAsString(String resource, Class<?> clazz) Load a classpath resource into a string using UTF-8 encoding and the class loader of the given class.Evaluate the xpath expression against the contained document.static Option<InputStream> IoSupport.openClassPathResource(String resource) Open a classpath resource using the class loader ofIoSupport.static Option<InputStream> IoSupport.openClassPathResource(String resource, Class<?> clazz) Open a classpath resource using the class loader of the given class.<A> Option<A> Deprecated.Deprecated.static <A> Option<A> IoSupport.withFile(File file, Function2<InputStream, File, A> f) Handle a stream insidefand ensure thatsgets closed properly.Methods in org.opencastproject.util that return types with arguments of type OptionModifier and TypeMethodDescriptionEnumSupport.parseEnum(A e) Create a function to parse a string into an Enum value.Methods in org.opencastproject.util with parameters of type OptionModifier and TypeMethodDescriptionstatic javax.ws.rs.core.Response.ResponseBuilderRestUtil.fileResponse(File f, String contentType, Option<String> fileName) Create a file response.static MimeTypeMimeType.mimeType(String type, String subtype, List<String> suffixes, List<MimeType> equivalents, Option<String> description, Option<String> flavor, Option<String> flavorDescription) static javax.ws.rs.core.ResponseRestUtil.R.ok(InputStream in, String contentType, Option<Long> streamLength, Option<String> fileName) Create a response with status OK from a stream.static javax.ws.rs.core.ResponseRestUtil.R.ok(InputStream in, Option<String> contentType, Option<Long> streamLength, Option<String> fileName) Create a response with status OK from a stream.static Jsons.PropCreate a property.static javax.ws.rs.core.Response.ResponseBuilderRestUtil.partialFileResponse(File f, String contentType, Option<String> fileName, String rangeHeader) create a partial file responsestatic Monadics.ListMonadic<String> RestUtil.splitCommaSeparatedParam(Option<String> param) Split a comma separated request param into a list of trimmed strings discarding any blank parts.static javax.ws.rs.core.Response.ResponseBuilderRestUtil.streamResponse(InputStream in, String contentType, Option<Long> streamLength, Option<String> fileName) Deprecated.static JobBarrier.ResultJobUtil.waitForJob(Job waiter, ServiceRegistry reg, Option<Long> timeout, Job job) Check ifjobis not done yet and wait in case.static JobBarrier.ResultJobUtil.waitForJob(ServiceRegistry reg, Option<Long> timeout, Job job) Check ifjobis not done yet and wait in case.JobUtil.waitForJobSuccess(Job waiter, ServiceRegistry reg, Option<Long> timeout) Wait for the job to complete and return the success value. -
Uses of Option in org.opencastproject.util.data
Methods in org.opencastproject.util.data that return OptionModifier and TypeMethodDescriptionabstract <B> Option<B> Monadic bind operationm a -> (a -> m b) -> m b.Return the first element satisfying predicatep.<B> Option<B> abstract <B> Option<B> static <A> Option<A> Option.fromOpt(com.entwinemedia.fn.data.Opt<A> a) Convert anOptinto anOption.static <A> Option<A> Deprecated.Return the head of listasornone.Monadics.ListMonadic.headOpt()Return the head of the list.<B> Option<B> static <A> Option<A> Option.none()Create a new none.static <A> Option<A> Option.none(A example) Create a none with the type ofexample.static <A> Option<A> Create a none with the given type.static <A> Option<A> Option.option(A a) Wrap an arbitrary object into an option withnullbeing mapped to none.Lazy version oforElse(Option).If this is none returnnoneelse this.Option.orError(T none) Thrownoneif none.static <A> Option<A> Option.some(A a) Create a new some.Methods in org.opencastproject.util.data that return types with arguments of type OptionMethods in org.opencastproject.util.data with parameters of type OptionModifier and TypeMethodDescriptionIf this is none returnnoneelse this.Method parameters in org.opencastproject.util.data with type arguments of type Option -
Uses of Option in org.opencastproject.util.data.functions
Fields in org.opencastproject.util.data.functions with type parameters of type OptionModifier and TypeFieldDescriptionStrings.toDoubleConvert a string into a long if possible.Strings.toIntConvert a string into an integer if possible.Strings.trimToNoneTrim a string and return eithersomeornoneif it's empty.Methods in org.opencastproject.util.data.functions that return OptionModifier and TypeMethodDescriptionReturna.toString()wrapped in a some ifa !static <A> Option<A> m (m a) -> m aOptions.sequenceOpt(List<Option<A>> as) Sequence a list of options.Returns some(message) if predicate is false, none otherwise.Strings.trimToNone(String a) Trim a string and return eithersomeornoneif it's empty.static <A> Option<A> Widening cast.Methods in org.opencastproject.util.data.functions that return types with arguments of type OptionModifier and TypeMethodDescriptionOptions.asList()Strings.asString()Returna.toString()wrapped in a some ifa !Apply effecteto the result offwhich is then returned.Methods in org.opencastproject.util.data.functions with parameters of type OptionModifier and TypeMethodDescriptionstatic <A> Option<A> m (m a) -> m astatic <A> Option<A> Widening cast.Method parameters in org.opencastproject.util.data.functions with type arguments of type OptionModifier and TypeMethodDescriptionApply effecteto the result offwhich is then returned.static <A> Option<A> m (m a) -> m aOptions.sequenceOpt(List<Option<A>> as) Sequence a list of options. -
Uses of Option in org.opencastproject.util.jaxb
Methods in org.opencastproject.util.jaxb that return OptionMethods in org.opencastproject.util.jaxb with parameters of type Option
RestUtil.R.ok(java.io.InputStream, String, org.opencastproject.util.data.Option, org.opencastproject.util.data.Option)instead