public class CommonUtil extends Object
Constructor and Description |
---|
CommonUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.axiom.om.OMElement |
buildOMElement(InputStream inputStream)
builds the OMElement from the given inputStream
|
static void |
denyAnonAuthorization(String path,
org.wso2.carbon.user.core.UserRealm userRealm) |
static String |
getAdminPassword() |
static String |
getAdminUserName() |
static String |
getCurrentMonthString() |
static Date |
getDateFromMonthString(String yearMonth) |
static String |
getEula() |
static String |
getMonthString(Calendar calendar) |
static String |
getMonthString(int relativeMonth) |
static String |
getNotificationEmailAddress()
Gets the notification email address of the admin upon the tenant creation.
|
static StratosConfiguration |
getStratosConfig() |
static String |
getSuperAdminEmail() |
static boolean |
isChargedOnRegistration() |
static boolean |
isDomainNameAvailable(String tenantDomain)
method to check whether a domain name is available to register given a domain name
|
static boolean |
isEmailValidationMandatory()
Checks whether the email validation is mandatory from the configuration file.
|
static boolean |
isPublicCloudSetup()
Checks whether it is for the public cloud setup or Mars.
|
static boolean |
isTenantActivationModerated() |
static boolean |
isTenantManagementEmailsDisabled()
Checks whether the email sending is enabled from the configuration file.
|
static StratosConfiguration |
loadStratosConfiguration()
Returns the configurations from the stratos configuration file.
|
static String |
loadTermsOfUsage()
Loading the EULA.
|
static void |
setAnonAuthorization(String path,
org.wso2.carbon.user.core.UserRealm userRealm) |
static void |
setEula(String eula) |
static void |
setStratosConfig(StratosConfiguration stratosConfig) |
static boolean |
validateDomainFromSuccessKey(org.wso2.carbon.registry.core.session.UserRegistry governanceSystemRegistry,
String domain,
String successKey)
validates domain from the successkey
|
static void |
validateEmail(String email)
validates the email
|
static void |
validateName(String name,
String variable) |
public static StratosConfiguration getStratosConfig()
public static void setStratosConfig(StratosConfiguration stratosConfig)
public static String getEula()
public static void setEula(String eula)
public static boolean isEmailValidationMandatory()
public static boolean isTenantManagementEmailsDisabled()
public static String getSuperAdminEmail()
public static String getAdminUserName()
public static String getAdminPassword()
public static boolean isTenantActivationModerated()
public static boolean isChargedOnRegistration()
public static boolean isPublicCloudSetup()
public static String getNotificationEmailAddress()
public static String getMonthString(int relativeMonth)
public static Date getDateFromMonthString(String yearMonth) throws ParseException
ParseException
public static String getCurrentMonthString()
public static void setAnonAuthorization(String path, org.wso2.carbon.user.core.UserRealm userRealm) throws org.wso2.carbon.registry.core.exceptions.RegistryException
org.wso2.carbon.registry.core.exceptions.RegistryException
public static void denyAnonAuthorization(String path, org.wso2.carbon.user.core.UserRealm userRealm) throws org.wso2.carbon.registry.core.exceptions.RegistryException
org.wso2.carbon.registry.core.exceptions.RegistryException
public static org.apache.axiom.om.OMElement buildOMElement(InputStream inputStream) throws Exception
inputStream,
- given input - inputStreamException,
- if building OMElement from the inputStream failed.Exception
public static void validateEmail(String email) throws Exception
email
- - email addressException,
- if validation failedException
public static void validateName(String name, String variable) throws Exception
name
- validate the name.variable
- entry name.Exception
- if emptypublic static boolean validateDomainFromSuccessKey(org.wso2.carbon.registry.core.session.UserRegistry governanceSystemRegistry, String domain, String successKey) throws org.wso2.carbon.registry.core.exceptions.RegistryException
governanceSystemRegistry
- - The governance system registrydomain
- - tenant domainsuccessKey
- - successkeyRegistryException,
- if validation failedorg.wso2.carbon.registry.core.exceptions.RegistryException
public static StratosConfiguration loadStratosConfiguration()
public static String loadTermsOfUsage()
public static boolean isDomainNameAvailable(String tenantDomain) throws Exception
tenantDomain,
- domain nameException,
- if checking the existence of the tenant is failed.Exception
Copyright © 2019 WSO2. All rights reserved.