|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.stratos.common.util.CommonUtil
public class CommonUtil
Common Utility methods for Stratos. Now this class has been growing with several util methods - Should refactor accordingly.
| Constructor Summary | |
|---|---|
CommonUtil()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommonUtil()
| Method Detail |
|---|
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(Calendar calendar)
public static String getMonthString(int relativeMonth)
public static Date getDateFromMonthString(String yearMonth)
throws ParseException
ParseExceptionpublic 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 - inputStream
Exception, - if building OMElement from the inputStream failed.
Exception
public static void validateEmail(String email)
throws Exception
email - - email address
Exception, - if validation failed
Exception
public static void validateName(String name,
String variable)
throws Exception
name - validate the name.variable - entry name.
Exception - if empty
public 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 - - successkey
RegistryException, - if validation failed
org.wso2.carbon.registry.core.exceptions.RegistryExceptionpublic static StratosConfiguration loadStratosConfiguration()
public static String loadTermsOfUsage()
public static boolean isDomainNameAvailable(String tenantDomain)
throws Exception
tenantDomain, - domain name
Exception, - if checking the existence of the tenant is failed.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||