本文整理汇总了Java中net.ymate.platform.core.YMP类的典型用法代码示例。如果您正苦于以下问题:Java YMP类的具体用法?Java YMP怎么用?Java YMP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
YMP类属于net.ymate.platform.core包,在下文中一共展示了YMP类的40个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-module-oauth-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
__moduleCfg.getTokenStorageAdapter().init(this);
//
if (__moduleCfg.isSnsEnabled()) {
if (__moduleCfg.getUserInfoAdapter() != null) {
__moduleCfg.getUserInfoAdapter().init(this);
}
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-module-oauth,
代码行数:20,
代码来源:OAuth.java
示例2: DefaultModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IOAuth.MODULE_NAME);
//
__accessTokenExpireIn = BlurObject.bind(_moduleCfgs.get("access_token_expire_in")).toIntValue();
if (__accessTokenExpireIn <= 0) {
__accessTokenExpireIn = 7200;
}
//
__cacheNamePrefix = StringUtils.trimToEmpty(_moduleCfgs.get("cache_name_prefix"));
//
__snsEnabled = BlurObject.bind(_moduleCfgs.get("sns_enabled")).toBooleanValue();
if (__snsEnabled) {
__authorizationView = StringUtils.defaultIfBlank(_moduleCfgs.get("authorization_view"), "_views/oauth2/sns-authorization");
__userInfoAdaptor = ClassUtils.impl(_moduleCfgs.get("userinfo_adapter_class"), IOAuthUserInfoAdapter.class, getClass());
}
//
__tokenGenerator = ClassUtils.impl(_moduleCfgs.get("token_generator_class"), IOAuthTokenGenerator.class, getClass());
if (__tokenGenerator == null) {
__tokenGenerator = new DefaultTokenGenerator();
}
//
__storageAdapter = ClassUtils.impl(_moduleCfgs.get("storage_adapter_class"), IOAuthStorageAdapter.class, getClass());
}
开发者ID:suninformation,
项目名称:ymate-module-oauth,
代码行数:24,
代码来源:DefaultModuleCfg.java
示例3: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-module-sso-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
//
__moduleCfg.getTokenAdapter().init(this);
if (!__moduleCfg.isClientMode() && __moduleCfg.getTokenStorageAdapter() != null) {
__moduleCfg.getTokenStorageAdapter().init(this);
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-module-sso,
代码行数:18,
代码来源:SSO.java
示例4: DefaultModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IWxPay.MODULE_NAME);
//
__accountProvider = ClassUtils.impl(_moduleCfgs.get("account_provider_class"), IWxPayAccountProvider.class, getClass());
if (__accountProvider == null) {
__accountProvider = new DefaultWxPayAccountProvider();
//
WxPayAccountMeta _meta = new WxPayAccountMeta(_moduleCfgs.get("app_id"),
_moduleCfgs.get(IWxPay.Const.MCH_ID),
_moduleCfgs.get(IWxPay.Const.MCH_KEY),
_moduleCfgs.get("cert_file_path"),
_moduleCfgs.get(IWxPay.Const.NOTIFY_URL));
_meta.setSandboxEnabled(BlurObject.bind(_moduleCfgs.get("sandbox_enabled")).toBooleanValue());
_meta.setSandboxPrefix(StringUtils.defaultIfBlank(_moduleCfgs.get("sandbox_prefix"), "sandboxnew"));
//
__defaultAccountId = _meta.getAppId();
__accountProvider.registerAccount(_meta);
} else {
__defaultAccountId = StringUtils.trimToNull(_moduleCfgs.get("default_account_id"));
}
//
__eventHandler = ClassUtils.impl(_moduleCfgs.get("event_handler_class"), IWxPayEventHandler.class, getClass());
if (__eventHandler == null) {
throw new NullArgumentException("event_handler_class");
}
//
__jsApiView = StringUtils.defaultIfBlank(_moduleCfgs.get("jsapi_view"), "wxpay_jsapi");
__nativeView = StringUtils.defaultIfBlank(_moduleCfgs.get("native_view"), "wxpay_native");
//
__signCheckDisabled = BlurObject.bind(_moduleCfgs.get("sign_check_disabled")).toBooleanValue();
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:32,
代码来源:DefaultModuleCfg.java
示例5: DefaultModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) {
__moduleCfgs = owner.getConfig().getModuleConfigs(IOAuthConnector.MODULE_NAME);
//
__cacheNamePrefix = StringUtils.trimToEmpty(__moduleCfgs.get("cache_name_prefix"));
//
__callbackHandler = ClassUtils.impl(__moduleCfgs.get("callback_handler_class"), IOAuthConnectCallbackHandler.class, this.getClass());
if (__callbackHandler == null) {
__callbackHandler = new DefaultConnectCallbackHandler();
}
//
__isPasswordEncrypted = BlurObject.bind(__moduleCfgs.get("password_encrypted")).toBooleanValue();
//
try {
__password = ClassUtils.impl(__moduleCfgs.get("password_class"), IPasswordProcessor.class, this.getClass());
} catch (Exception ignored) {
}
}
开发者ID:suninformation,
项目名称:ymate-module-oauth-connector,
代码行数:18,
代码来源:DefaultModuleCfg.java
示例6: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-module-oauth-connector-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
__owner.registerHandler(OAuthConnectProcessor.class, new OAuthConnectProcessorHandler(this));
//
__moduleCfg.getConnectCallbackHandler().init(this);
//
__connectProcessors = new HashMap<String, IOAuthConnectProcessor>();
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-module-oauth-connector,
代码行数:18,
代码来源:OAuthConnector.java
示例7: __doGetInterceptMeta
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
private InterceptMeta __doGetInterceptMeta(YMP owner, Class<?> targetClass, Method targetMethod) {
String _id = DigestUtils.md5Hex(targetClass.toString() + targetMethod.toString());
//
if (__interceptMetasCache.containsKey(_id)) {
return __interceptMetasCache.get(_id);
}
if (targetClass.isAnnotationPresent(Before.class) || targetClass.isAnnotationPresent(After.class) || targetClass.isAnnotationPresent(Around.class)
|| targetMethod.isAnnotationPresent(Before.class) || targetMethod.isAnnotationPresent(After.class) || targetMethod.isAnnotationPresent(Around.class)
|| owner.getConfig().getInterceptSettings().hasInterceptPackages(targetClass)) {
synchronized (__cacheLocker) {
InterceptMeta _meta = __interceptMetasCache.get(_id);
if (_meta == null) {
_meta = new InterceptMeta(owner, _id, targetClass, targetMethod);
__interceptMetasCache.put(_id, _meta);
}
return _meta;
}
}
return InterceptMeta.__DEFAULT;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:21,
代码来源:InterceptProxy.java
示例8: parseContextParamValue
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static void parseContextParamValue(YMP owner, ContextParam contextParam, Map<String, String> paramsMap) {
if (contextParam != null) {
for (ParamItem _item : contextParam.value()) {
String _key = _item.key();
String _value = _item.value();
boolean _flag = _value.length() > 1 && _value.charAt(0) == '$';
if (StringUtils.isBlank(_key)) {
if (_flag) {
_key = _value.substring(1);
_value = StringUtils.trimToEmpty(owner.getConfig().getParam(_key));
} else {
_key = _value;
}
} else if (_flag) {
_value = StringUtils.trimToEmpty(owner.getConfig().getParam(_value.substring(1)));
}
paramsMap.put(_key, _value);
}
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:21,
代码来源:InterceptAnnoHelper.java
示例9: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-webmvc-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
__owner.getEvents().registerEvent(WebEvent.class);
__owner.registerHandler(Controller.class, new ControllerHandler(this));
//
if (__moduleCfg.getErrorProcessor() instanceof IWebInitializable) {
((IWebInitializable) __moduleCfg.getErrorProcessor()).init(this);
}
if (__moduleCfg.isConventionInterceptorMode()) {
__interceptorRuleProcessor = new DefaultInterceptorRuleProcessor();
__interceptorRuleProcessor.init(this);
__owner.registerHandler(InterceptorRule.class, new InterceptorRuleHandler(this));
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:23,
代码来源:WebMVC.java
示例10: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-persistence-mongodb-" + VERSION);
//
__owner = owner;
__moduleCfg = new MongoModuleCfg(owner);
//
__dataSourceCaches = new HashMap<String, IMongoDataSourceAdapter>();
for (MongoDataSourceCfgMeta _meta : __moduleCfg.getDataSourceCfgs().values()) {
IMongoDataSourceAdapter _adapter = new MongoDataSourceAdapter();
_adapter.initialize(__moduleCfg.getClientOptionsHandler(), _meta);
// 将数据源适配器添加到缓存
__dataSourceCaches.put(_meta.getName(), _adapter);
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:20,
代码来源:MongoDB.java
示例11: MongoModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public MongoModuleCfg(YMP owner) throws Exception {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IMongo.MODULE_NAME);
//
this.dataSourceDefaultName = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_default_name"), "default");
this.clientOptionsHandler = ClassUtils.impl(_moduleCfgs.get("ds_options_handler_class"), IMongoClientOptionsHandler.class, this.getClass());
//
this.dataSourceCfgMetas = new HashMap<String, MongoDataSourceCfgMeta>();
String _dsNameStr = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_name_list"), "default");
if (StringUtils.contains(_dsNameStr, this.dataSourceDefaultName)) {
String[] _dsNameList = StringUtils.split(_dsNameStr, "|");
for (String _dsName : _dsNameList) {
MongoDataSourceCfgMeta _meta = __doParserDataSourceCfgMeta(_dsName, _moduleCfgs);
if (_meta != null) {
this.dataSourceCfgMetas.put(_dsName, _meta);
}
}
} else {
throw new IllegalArgumentException("The default datasource name does not match");
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:21,
代码来源:MongoModuleCfg.java
示例12: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-serv-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
//
__owner.registerExcludedClass(IServer.class);
__owner.registerExcludedClass(IServerCfg.class);
__owner.registerExcludedClass(IClient.class);
__owner.registerExcludedClass(IClientCfg.class);
__owner.registerExcludedClass(ICodec.class);
__owner.registerExcludedClass(IListener.class);
//
__owner.registerHandler(Server.class, new ServerHandler(this));
__owner.registerHandler(Client.class, new ClientHandler(this));
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:23,
代码来源:Servs.java
示例13: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-log-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(__owner);
// 设置全局变量,便于配置文件内引用
System.getProperties().put("LOG_OUT_DIR", __moduleCfg.getOutputDir().getPath());
//
if (__moduleCfg.getLoggerClass() != null) {
__currentLogger = ClassUtils.impl(__moduleCfg.getLoggerClass(), ILogger.class);
}
if (__currentLogger == null) {
__currentLogger = new DefaultLogger();
}
__LOGGER_CACHE.put(__moduleCfg.getLoggerName(), __currentLogger);
//
__currentLogger.init(this, __moduleCfg.getLoggerName());
__currentLogger.console(__moduleCfg.allowOutputConsole());
//
__inited = true;
// 注册日志记录器事件
__owner.getEvents().registerEvent(LogEvent.class);
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:27,
代码来源:Logs.java
示例14: DefaultModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public DefaultModuleCfg(YMP owner) {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IConfig.MODULE_NAME);
//
this.configHome = _moduleCfgs.get("config_home");
if (StringUtils.isBlank(this.configHome)) {
// 尝试通过运行时变量或系统变量获取CONFIG_HOME参数
this.configHome = StringUtils.defaultIfBlank(System.getenv(IConfig.__CONFIG_HOME), RuntimeUtils.getSystemEnv(IConfig.__CONFIG_HOME));
}
this.configHome = RuntimeUtils.replaceEnvVariable(StringUtils.defaultIfEmpty(this.configHome, "${root}"));
//
this.projectName = _moduleCfgs.get("project_name");
this.moduleName = _moduleCfgs.get("module_name");
//
try {
if (StringUtils.isNotBlank(_moduleCfgs.get("provider_class"))) {
this.providerClass = (Class<? extends IConfigurationProvider>) ClassUtils.loadClass(_moduleCfgs.get("provider_class"), this.getClass());
} else {
this.providerClass = DefaultConfigurationProvider.class;
}
} catch (Exception e) {
this.providerClass = DefaultConfigurationProvider.class;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:25,
代码来源:DefaultModuleCfg.java
示例15: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-persistence-jdbc-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
//
__owner.getEvents().registerEvent(DatabaseEvent.class);
__owner.registerHandler(Repository.class, new RepoHandler(this));
//
__dsCaches = new HashMap<String, IDataSourceAdapter>();
for (DataSourceCfgMeta _meta : __moduleCfg.getDataSourceCfgs().values()) {
IDataSourceAdapter _adapter = _meta.getAdapterClass().newInstance();
_adapter.initialize(_meta);
// 将数据源适配器添加到缓存
__dsCaches.put(_meta.getName(), _adapter);
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:24,
代码来源:JDBC.java
示例16: DefaultModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) throws Exception {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IDatabase.MODULE_NAME);
//
this.dataSourceDefaultName = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_default_name"), "default");
//
this.dataSourceCfgMetas = new HashMap<String, DataSourceCfgMeta>();
String _dsNameStr = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_name_list"), "default");
if (StringUtils.contains(_dsNameStr, this.dataSourceDefaultName)) {
String[] _dsNameList = StringUtils.split(_dsNameStr, "|");
for (String _dsName : _dsNameList) {
DataSourceCfgMeta _meta = __doParserDataSourceCfgMeta(_dsName, _moduleCfgs);
if (_meta != null) {
this.dataSourceCfgMetas.put(_dsName, _meta);
}
}
} else {
throw new IllegalArgumentException("The default datasource name does not match");
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:20,
代码来源:DefaultModuleCfg.java
示例17: ConfigInfo
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public ConfigInfo(YMP owner) {
IConfig _config = owner.getConfig();
//
this.useBaseEntity = BlurObject.bind(_config.getParam("jdbc.use_base_entity")).toBooleanValue();
this.useClassSuffix = BlurObject.bind(_config.getParam("jdbc.use_class_suffix")).toBooleanValue();
this.useChainMode = BlurObject.bind(_config.getParam("jdbc.use_chain_mode")).toBooleanValue();
this.useStateSupport = BlurObject.bind(_config.getParam("jdbc.use_state_support")).toBooleanValue();
this.packageName = StringUtils.defaultIfBlank(_config.getParam("jdbc.package_name"), "packages");
this.outputPath = RuntimeUtils.replaceEnvVariable(StringUtils.defaultIfBlank(owner.getConfig().getParam("jdbc.output_path"), "${root}"));
this.dbName = _config.getParam("jdbc.db_name");
this.dbUserName = _config.getParam("jdbc.db_username");
this.tablePrefixes = Arrays.asList(StringUtils.split(StringUtils.trimToEmpty(_config.getParam("jdbc.table_prefix")), '|'));
this.removePrefix = new BlurObject(_config.getParam("jdbc.remove_table_prefix")).toBooleanValue();
this.tableExcludeList = Arrays.asList(StringUtils.split(StringUtils.trimToEmpty(_config.getParam("jdbc.table_exclude_list")).toLowerCase(), "|"));
this.tableList = Arrays.asList(StringUtils.split(StringUtils.trimToEmpty(_config.getParam("jdbc.table_list")), "|"));
//
this.namedFilter = ClassUtils.impl(_config.getParam("jdbc.named_filter_class"), IEntityNamedFilter.class, this.getClass());
this.readonlyFields = Arrays.asList(StringUtils.split(StringUtils.trimToEmpty(_config.getParam("jdbc.readonly_field_list")).toLowerCase(), '|'));
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:20,
代码来源:ConfigInfo.java
示例18: RedisModuleCfg
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public RedisModuleCfg(YMP owner) throws Exception {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IRedis.MODULE_NAME);
//
this.dataSourceDefaultName = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_default_name"), "default");
//
this.dataSourceCfgMetas = new HashMap<String, RedisDataSourceCfgMeta>();
String _dsNameStr = StringUtils.defaultIfBlank(_moduleCfgs.get("ds_name_list"), "default");
if (StringUtils.contains(_dsNameStr, this.dataSourceDefaultName)) {
String[] _dsNameList = StringUtils.split(_dsNameStr, "|");
for (String _dsName : _dsNameList) {
RedisDataSourceCfgMeta _meta = __doParserDataSourceCfgMeta(_dsName, _moduleCfgs);
if (_meta != null) {
this.dataSourceCfgMetas.put(_dsName, _meta);
}
}
} else {
throw new IllegalArgumentException("The default datasource name does not match");
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:20,
代码来源:RedisModuleCfg.java
示例19: init
点赞 3
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-platform-persistence-redis-" + VERSION);
//
__owner = owner;
__moduleCfg = new RedisModuleCfg(owner);
//
__dataSourceCaches = new HashMap<String, IRedisDataSourceAdapter>();
for (RedisDataSourceCfgMeta _meta : __moduleCfg.getDataSourceCfgs().values()) {
IRedisDataSourceAdapter _adapter = new RedisDataSourceAdapter();
_adapter.initialize(_meta);
// 将数据源适配器添加到缓存
__dataSourceCaches.put(_meta.getName(), _adapter);
}
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:20,
代码来源:Redis.java
示例20: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static IOAuth get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(OAuth.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-module-oauth,
代码行数:11,
代码来源:OAuth.java
示例21: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static ISSO get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(SSO.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-module-sso,
代码行数:11,
代码来源:SSO.java
示例22: DefaultModuleCfg
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(ISSO.MODULE_NAME);
//
__tokenCookieName = StringUtils.defaultIfBlank(_moduleCfgs.get("token_cookie_name"), ISSO.MODULE_NAME + "_token");
//
__tokenHeaderName = StringUtils.defaultIfBlank(_moduleCfgs.get("token_header_name"), "X-ModuleSSO-Token");
//
__tokenParamName = StringUtils.defaultIfBlank(_moduleCfgs.get("token_param_name"), "token");
//
__tokenMaxage = BlurObject.bind(_moduleCfgs.get("token_maxage")).toIntValue();
//
__tokenValidateTimeInterval = BlurObject.bind(_moduleCfgs.get("token_validate_time_interval")).toIntValue();
//
__cacheNamePrefix = StringUtils.trimToEmpty(_moduleCfgs.get("cache_name_prefix"));
//
__multiSessionEnabled = BlurObject.bind(_moduleCfgs.get("multi_session_enabled")).toBooleanValue();
//
__ipCheckEnabled = BlurObject.bind(_moduleCfgs.get("ip_check_enabled")).toBooleanValue();
//
__isClientMode = BlurObject.bind(_moduleCfgs.get("client_mode")).toBooleanValue();
//
__serviceAuthKey = StringUtils.trimToEmpty(_moduleCfgs.get("service_auth_key"));
//
if (__isClientMode) {
__serviceBaseUrl = StringUtils.trimToNull(_moduleCfgs.get("service_base_url"));
if (__serviceBaseUrl != null) {
if (!StringUtils.startsWithIgnoreCase(__serviceBaseUrl, "http://") &&
!StringUtils.startsWithIgnoreCase(__serviceBaseUrl, "https://")) {
throw new IllegalArgumentException("The parameter service_base_url is invalid");
} else if (!StringUtils.endsWith(__serviceBaseUrl, "/")) {
__serviceBaseUrl = __serviceBaseUrl + "/";
}
}
}
//
__tokenApater = ClassUtils.impl(_moduleCfgs.get("token_adapter_class"), ISSOTokenAdapter.class, getClass());
if (__tokenApater == null) {
__tokenApater = new DefaultSSOTokenAdapter();
}
//
__tokenStorageAdapter = ClassUtils.impl(_moduleCfgs.get("storage_adapter_class"), ISSOTokenStorageAdapter.class, getClass());
if (!__isClientMode && __tokenStorageAdapter == null) {
throw new IllegalArgumentException("The parameter storage_adapter_class is invalid");
}
//
if (!__isClientMode) {
__tokenAttributeAdapter = ClassUtils.impl(_moduleCfgs.get("attribute_adapter_class"), ISSOTokenAttributeAdapter.class, getClass());
}
}
开发者ID:suninformation,
项目名称:ymate-module-sso,
代码行数:50,
代码来源:DefaultModuleCfg.java
示例23: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static IWxPay get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(WxPay.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:11,
代码来源:WxPay.java
示例24: init
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-payment-wxpay-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
//
__moduleCfg.getAccountProvider().init(this);
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:14,
代码来源:WxPay.java
示例25: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static IAliPay get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(AliPay.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:11,
代码来源:AliPay.java
示例26: init
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void init(YMP owner) throws Exception {
if (!__inited) {
//
_LOG.info("Initializing ymate-payment-alipay-" + VERSION);
//
__owner = owner;
__moduleCfg = new DefaultModuleCfg(owner);
//
__moduleCfg.getAccountProvider().init(this);
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:14,
代码来源:AliPay.java
示例27: DefaultModuleCfg
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultModuleCfg(YMP owner) {
Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(IAliPay.MODULE_NAME);
//
__gatewayUrl = StringUtils.defaultIfBlank(_moduleCfgs.get("gateway_url"), "https://openapi.alipay.com/gateway.do");
if (!StringUtils.startsWithIgnoreCase(__gatewayUrl, "https://") && !StringUtils.startsWithIgnoreCase(__gatewayUrl, "http://")) {
throw new IllegalArgumentException("gateway_url address is invalid");
}
//
__accountProvider = ClassUtils.impl(_moduleCfgs.get("account_provider_class"), IAliPayAccountProvider.class, getClass());
if (__accountProvider == null) {
__accountProvider = new DefaultAliPayAccountProvider();
//
AliPayAccountMeta _meta = new AliPayAccountMeta(_moduleCfgs.get(IAliPay.Const.APP_ID), _moduleCfgs.get(IAliPay.Const.SIGN_TYPE), _moduleCfgs.get("private_key"), _moduleCfgs.get("public_key"));
_meta.setCharset(StringUtils.defaultIfBlank(_moduleCfgs.get(IAliPay.Const.CHARSET), IAliPay.Const.CHARSET_UTF8));
_meta.setFormat(StringUtils.defaultIfBlank(_moduleCfgs.get(IAliPay.Const.FORMAT), IAliPay.Const.FORMAT_JSON));
_meta.setNotifyUrl(StringUtils.trimToNull(_moduleCfgs.get(IAliPay.Const.NOTIFY_URL)));
_meta.setReturnUrl(StringUtils.trimToNull(_moduleCfgs.get(IAliPay.Const.RETURN_URL)));
//
__defaultAccountId = _meta.getAppId();
__accountProvider.registerAccount(_meta);
} else {
__defaultAccountId = StringUtils.trimToNull(_moduleCfgs.get("default_account_id"));
}
//
__eventHandler = ClassUtils.impl(_moduleCfgs.get("event_handler_class"), IAliPayEventHandler.class, getClass());
if (__eventHandler == null) {
throw new NullArgumentException("event_handler_class");
}
//
__signCheckDisabled = BlurObject.bind(_moduleCfgs.get("sign_check_disabled")).toBooleanValue();
}
开发者ID:suninformation,
项目名称:ymate-payment-v2,
代码行数:32,
代码来源:DefaultModuleCfg.java
示例28: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static IOAuthConnector get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(OAuthConnector.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-module-oauth-connector,
代码行数:11,
代码来源:OAuthConnector.java
示例29: init
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
@Override
public void init(YMP owner) throws Exception {
if (!__inited) {
//
owner.registerHandler(Entity.class, new EntityHandler(owner));
//
__inited = true;
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:10,
代码来源:Persistence.java
示例30: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
/**
* @return 返回默认插件框架管理器实例对象
*/
public static IPlugins get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(Plugins.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:Plugins.java
示例31: DefaultPluginFactory
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public DefaultPluginFactory(YMP owner) {
__owner = owner;
//
__pluginMetaWithId = new ConcurrentHashMap<String, PluginMeta>();
__pluginMetaWithClass = new ConcurrentHashMap<Class<? extends IPlugin>, PluginMeta>();
//
__innerBeanFactory = __doBuildBeanFactory(this, true);
__outerBeanFactory = __doBuildBeanFactory(this, false);
__innerBeanFactory.registerHandler(Plugin.class, new PluginHandler(this));
__outerBeanFactory.registerHandler(Plugin.class, new PluginHandler(this));
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:12,
代码来源:DefaultPluginFactory.java
示例32: InterceptMeta
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
InterceptMeta(YMP owner, String id, Class<?> targetClass, Method targetMethod) {
this.id = id;
this.contextParams = new HashMap<String, String>();
//
this.beforeIntercepts = InterceptAnnoHelper.getBeforeIntercepts(targetClass, targetMethod);
this.afterIntercepts = InterceptAnnoHelper.getAfterIntercepts(targetClass, targetMethod);
//
InterceptSettings _interceptSettings = owner.getConfig().getInterceptSettings();
//
for (InterceptSettings.InterceptPackageMeta _item : _interceptSettings.getInterceptPackages(targetClass)) {
if (!_item.getBeforeIntercepts().isEmpty()) {
this.beforeIntercepts.addAll(0, _item.getBeforeIntercepts());
}
if (!_item.getAfterIntercepts().isEmpty()) {
this.afterIntercepts.addAll(0, _item.getAfterIntercepts());
}
//
for (ContextParam _ctxParam : _item.getContextParams()) {
InterceptAnnoHelper.parseContextParamValue(owner, _ctxParam, this.contextParams);
}
}
//
this.contextParams.putAll(InterceptAnnoHelper.getContextParams(owner, targetClass, targetMethod));
//
if (owner.getConfig().isInterceptSettingsEnabled()) {
this.beforeIntercepts = _interceptSettings.doBeforeSet(this.beforeIntercepts, targetClass, targetMethod);
this.afterIntercepts = _interceptSettings.doAfterSet(this.afterIntercepts, targetClass, targetMethod);
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:30,
代码来源:InterceptProxy.java
示例33: getContextParams
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public static Map<String, String> getContextParams(YMP owner, Class<?> targetClass, Method targetMethod) {
Map<String, String> _contextParams = new HashMap<String, String>();
//
if (targetClass != null) {
parseContextParamValue(owner, targetClass.getAnnotation(ContextParam.class), _contextParams);
}
if (targetMethod != null) {
parseContextParamValue(owner, targetMethod.getAnnotation(ContextParam.class), _contextParams);
}
//
return _contextParams;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:13,
代码来源:InterceptAnnoHelper.java
示例34: InterceptContext
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public InterceptContext(IInterceptor.Direction direction, YMP owner, Object targetObject, Method targetMethod, Object[] methodParams, Map<String, String> contextParams) {
__direction = direction;
__owner = owner;
__targetObject = targetObject;
__targetMethod = targetMethod;
__methodParams = methodParams;
__contextParams = contextParams;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:9,
代码来源:InterceptContext.java
示例35: contextDestroyed
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
public void contextDestroyed(ServletContextEvent sce) {
__doFireEvent(WebEvent.EVENT.SERVLET_CONTEXT_DESTROYED, sce);
try {
YMP.get().destroy();
} catch (Exception ex) {
throw new RuntimeException(RuntimeUtils.unwrapThrow(ex));
}
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:9,
代码来源:WebAppEventListener.java
示例36: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
/**
* @return 返回默认MVC框架管理器实例对象
*/
public static IWebMvc get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(WebMVC.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:WebMVC.java
示例37: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
/**
* @return 返回默认MongoDB模块管理器实例对象
*/
public static IMongo get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(MongoDB.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:MongoDB.java
示例38: __tryCheckAndInitLogImpl
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
private boolean __tryCheckAndInitLogImpl() {
if (YMP.get() == null || !YMP.get().isInited() || Logs.get() == null || !Logs.get().isInited()) {
return false;
} else if (!__inited && YMP.get() != null && YMP.get().isInited() && Logs.get() != null && Logs.get().isInited()) {
try {
__logger = Logs.get().getLogger(__loggerName).depth(5);
__inited = true;
} catch (Exception e) {
__tryGetLogSafely().warn("", RuntimeUtils.unwrapThrow(e));
}
}
return __inited;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:JCLogger.java
示例39: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
/**
* @return 返回默认服务模块管理器实例对象
*/
public static IServ get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(Servs.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:Servs.java
示例40: get
点赞 2
import net.ymate.platform.core.YMP; //导入依赖的package包/类
/**
* @return 返回默认日志记录器模块管理器实例对象
*/
public static ILog get() {
if (__instance == null) {
synchronized (VERSION) {
if (__instance == null) {
__instance = YMP.get().getModule(Logs.class);
}
}
}
return __instance;
}
开发者ID:suninformation,
项目名称:ymate-platform-v2,
代码行数:14,
代码来源:Logs.java