public class MediaTypesUtils extends Object
| Constructor and Description |
|---|
MediaTypesUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getAllHumanTypes() |
static String |
getCollectionMediaTypeMappings(Registry configSystemRegistry)
Method to obtain the collection media types.
|
static String |
getCollectionMediaTypeMappings(RegistryContext registryContext)
Method to obtain the collection media types.
|
static String |
getCustomUIMediaTypeMappings(Registry configSystemRegistry)
Method to obtain the custom UI media types.
|
static String |
getCustomUIMediaTypeMappings(RegistryContext registryContext)
Method to obtain the custom UI media types.
|
static String |
getHumanReadableMediaTypeFromMimeType(String mediaType) |
static String |
getMediaType(String resourceName)
Method to obtain the media type of a given resource.
|
static String |
getMimeTypeFromHumanReadableMediaType(String mediaType)
Method to obtain the mime type when the human readable media type is given
|
static String |
getResourceMediaTypeMappings(Registry configSystemRegistry)
Method to obtain the resource media types.
|
static String |
getResourceMediaTypeMappings(RegistryContext registryContext)
Method to obtain the resource media types.
|
static String[] |
getResultPaths(Registry registry,
String mediaType)
Method to obtain a list of paths having resources of the given media type.
|
public static String getCollectionMediaTypeMappings(RegistryContext registryContext) throws RegistryException
registryContext - the registry context.RegistryException - if the operation failed.public static String[] getResultPaths(Registry registry, String mediaType) throws RegistryException
registry - the registry instance to run query on.mediaType - the media type.RegistryException - if the operation failed.public static String getCollectionMediaTypeMappings(Registry configSystemRegistry) throws RegistryException
configSystemRegistry - a configuration system registry instance.RegistryException - if the operation failed.public static String getCustomUIMediaTypeMappings(RegistryContext registryContext) throws RegistryException
registryContext - the registry context.RegistryException - if the operation failed.public static String getCustomUIMediaTypeMappings(Registry configSystemRegistry) throws RegistryException
configSystemRegistry - a configuration system registry instance.RegistryException - if the operation failed.public static String getResourceMediaTypeMappings(RegistryContext registryContext) throws RegistryException
registryContext - the registry context.RegistryException - if the operation failed.public static String getResourceMediaTypeMappings(Registry configSystemRegistry) throws RegistryException
configSystemRegistry - a configuration system registry instance.RegistryException - if the operation failed.public static String getMediaType(String resourceName) throws RegistryException
resourceName - the name of the resource.RegistryException - if the operation failed.public static String getMimeTypeFromHumanReadableMediaType(String mediaType)
mediaType - - the human readable media typepublic static String getHumanReadableMediaTypeFromMimeType(String mediaType)
public static String getAllHumanTypes()
Copyright © 2016 WSO2 Inc. All Rights Reserved.