Package org.wso2.carbon.utils.security
Enum KeystoreUtils.StoreFileType
- java.lang.Object
-
- java.lang.Enum<KeystoreUtils.StoreFileType>
-
- org.wso2.carbon.utils.security.KeystoreUtils.StoreFileType
-
- All Implemented Interfaces:
Serializable,Comparable<KeystoreUtils.StoreFileType>
- Enclosing class:
- KeystoreUtils
public static enum KeystoreUtils.StoreFileType extends Enum<KeystoreUtils.StoreFileType>
A collection of file type extensions against the store file type.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdefaultFileType()If the `Security.TenantKeyStore.Type` is defined, return the type, otherwise return FALLBACK_TENANTED_KEYSTORE_FILE_TYPE.static StringgetExtension(KeystoreUtils.StoreFileType tileType)Get extension of the store file type (ex: .jks, .p12).static voidvalidateFileType(String fileType)Check the configured store file type is supporting (ex: JKS, PKCS12).static KeystoreUtils.StoreFileTypevalueOf(String name)Returns the enum constant of this type with the specified name.static KeystoreUtils.StoreFileType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JKS
public static final KeystoreUtils.StoreFileType JKS
-
PKCS12
public static final KeystoreUtils.StoreFileType PKCS12
-
-
Method Detail
-
values
public static KeystoreUtils.StoreFileType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeystoreUtils.StoreFileType c : KeystoreUtils.StoreFileType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeystoreUtils.StoreFileType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getExtension
public static String getExtension(KeystoreUtils.StoreFileType tileType)
Get extension of the store file type (ex: .jks, .p12).- Throws:
IllegalArgumentException- the File type .
-
defaultFileType
public static String defaultFileType()
If the `Security.TenantKeyStore.Type` is defined, return the type, otherwise return FALLBACK_TENANTED_KEYSTORE_FILE_TYPE.
-
validateFileType
public static void validateFileType(String fileType) throws CarbonException
Check the configured store file type is supporting (ex: JKS, PKCS12).- Throws:
IllegalArgumentException- the File type .CarbonException
-
-