Commit 282e94d9 by Jason Song Committed by GitHub

Merge pull request #463 from lepdou/email

refactor portal package structure
parents 1f6d2cdc d121abf3
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.openapi.dto.OpenEnvClusterDTO;
import com.ctrip.framework.apollo.portal.PortalSettings;
import com.ctrip.framework.apollo.portal.components.PortalSettings;
import com.ctrip.framework.apollo.portal.service.ClusterService;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
import com.ctrip.framework.apollo.portal.service.ItemService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......
......@@ -10,7 +10,7 @@ import com.ctrip.framework.apollo.openapi.dto.OpenReleaseDTO;
import com.ctrip.framework.apollo.openapi.util.OpenApiBeanUtils;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel;
import com.ctrip.framework.apollo.portal.service.ReleaseService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......
package com.ctrip.framework.apollo.portal.api;
import com.ctrip.framework.apollo.portal.components.RetryableRestTemplate;
import org.springframework.beans.factory.annotation.Autowired;
public class API {
public abstract class API {
@Autowired
protected RetryableRestTemplate restTemplate;
......
package com.ctrip.framework.apollo.portal.api;
package com.ctrip.framework.apollo.portal.components;
import com.google.common.collect.Lists;
import com.ctrip.framework.apollo.core.MetaDomainConsts;
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.PortalSettings;
import com.dianping.cat.Cat;
import org.slf4j.Logger;
......
package com.ctrip.framework.apollo.portal.auth;
package com.ctrip.framework.apollo.portal.components;
import com.ctrip.framework.apollo.common.entity.AppNamespace;
import com.ctrip.framework.apollo.portal.constant.PermissionType;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.service.RolePermissionService;
import com.ctrip.framework.apollo.portal.util.RoleUtils;
......
package com.ctrip.framework.apollo.portal;
package com.ctrip.framework.apollo.portal.components;
import com.ctrip.framework.apollo.core.enums.Env;
......@@ -80,7 +80,7 @@ public class PortalSettings {
return activeEnvs;
}
class HealthCheckTask implements Runnable {
private class HealthCheckTask implements Runnable {
private static final int ENV_DOWN_THRESHOLD = 2;
......
package com.ctrip.framework.apollo.portal.api;
package com.ctrip.framework.apollo.portal.components;
import com.google.common.io.BaseEncoding;
......
package com.ctrip.framework.apollo.portal.api;
package com.ctrip.framework.apollo.portal.components;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
......
package com.ctrip.framework.apollo.portal.service.txtresolver;
package com.ctrip.framework.apollo.portal.components.txtresolver;
import com.ctrip.framework.apollo.common.dto.ItemChangeSets;
import com.ctrip.framework.apollo.common.dto.ItemDTO;
......@@ -6,7 +6,7 @@ import com.ctrip.framework.apollo.common.dto.ItemDTO;
import java.util.List;
/**
* users can modify config in text mode.so need updateConfigItemByText text.
* users can modify config in text mode.so need resolve text.
*/
public interface ConfigTextResolver {
......
package com.ctrip.framework.apollo.portal.service.txtresolver;
package com.ctrip.framework.apollo.portal.components.txtresolver;
import com.ctrip.framework.apollo.common.dto.ItemChangeSets;
import com.ctrip.framework.apollo.common.dto.ItemDTO;
......
package com.ctrip.framework.apollo.portal.service.txtresolver;
package com.ctrip.framework.apollo.portal.components.txtresolver;
import com.ctrip.framework.apollo.common.dto.ItemChangeSets;
import com.ctrip.framework.apollo.common.dto.ItemDTO;
......
......@@ -10,12 +10,12 @@ import com.ctrip.framework.apollo.common.http.RichResponseEntity;
import com.ctrip.framework.apollo.common.utils.InputValidator;
import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.PortalSettings;
import com.ctrip.framework.apollo.portal.components.PortalSettings;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo;
import com.ctrip.framework.apollo.portal.listener.AppCreationEvent;
import com.ctrip.framework.apollo.portal.service.AppService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
......
......@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.common.utils.InputValidator;
import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.service.ClusterService;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -2,7 +2,7 @@ package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.openapi.entity.ConsumerToken;
import com.ctrip.framework.apollo.openapi.service.ConsumerService;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
......
package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.PortalSettings;
import com.ctrip.framework.apollo.portal.components.PortalSettings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ItemDTO;
import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceSyncModel;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel;
import com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs;
......
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.GrayReleaseRuleDTO;
import com.ctrip.framework.apollo.common.dto.NamespaceDTO;
import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.auth.PermissionValidator;
import com.ctrip.framework.apollo.portal.components.PermissionValidator;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO;
import com.ctrip.framework.apollo.portal.service.NamespaceBranchService;
......
......@@ -11,7 +11,7 @@ import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceCreationModel;
import com.ctrip.framework.apollo.portal.constant.RoleType;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO;
......
......@@ -4,14 +4,14 @@ import com.google.common.collect.Sets;
import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.RoleType;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.entity.vo.AppRolesAssignedUsers;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceRolesAssignedUsers;
import com.ctrip.framework.apollo.portal.entity.vo.PermissionCondition;
import com.ctrip.framework.apollo.portal.service.RolePermissionService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import com.ctrip.framework.apollo.portal.util.RoleUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -3,7 +3,7 @@ package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.common.utils.RequestPrecondition;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.ServerConfig;
import com.ctrip.framework.apollo.portal.repository.ServerConfigRepository;
......
package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.portal.auth.SsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.SsoHeartbeatHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
......
package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.portal.auth.LogoutHandler;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.LogoutHandler;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......
/**
* 携程内部的日志系统,第三方公司可删除
*/
package com.ctrip.framework.apollo.portal.customize;
package com.ctrip.framework.apollo.portal.auth;
package com.ctrip.framework.apollo.portal.extend;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......
package com.ctrip.framework.apollo.portal.auth;
package com.ctrip.framework.apollo.portal.extend;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......
package com.ctrip.framework.apollo.portal.auth;
package com.ctrip.framework.apollo.portal.extend;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
/**
* 获取登录用户的信息,不同的公司应该有不同的实现
* Get access to the user's information,
* different companies should have a different implementation
*/
public interface UserInfoHolder {
......
package com.ctrip.framework.apollo.portal.service;
package com.ctrip.framework.apollo.portal.extend;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
......
package com.ctrip.framework.apollo.portal.configuration;
package com.ctrip.framework.apollo.portal.extend.configuration;
import com.google.common.collect.Maps;
import com.ctrip.framework.apollo.openapi.filter.ConsumerAuthenticationFilter;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuditUtil;
import com.ctrip.framework.apollo.openapi.util.ConsumerAuthUtil;
import com.ctrip.framework.apollo.portal.auth.LogoutHandler;
import com.ctrip.framework.apollo.portal.auth.SsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.auth.ctrip.CtripLogoutHandler;
import com.ctrip.framework.apollo.portal.auth.ctrip.CtripSsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.auth.ctrip.CtripUserInfoHolder;
import com.ctrip.framework.apollo.portal.auth.ctrip.CtripUserService;
import com.ctrip.framework.apollo.portal.auth.defaultimpl.DefaultLogoutHandler;
import com.ctrip.framework.apollo.portal.auth.defaultimpl.DefaultSsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.auth.defaultimpl.DefaultUserInfoHolder;
import com.ctrip.framework.apollo.portal.auth.defaultimpl.DefaultUserService;
import com.ctrip.framework.apollo.portal.extend.LogoutHandler;
import com.ctrip.framework.apollo.portal.extend.SsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.ctrip.CtripLogoutHandler;
import com.ctrip.framework.apollo.portal.extend.ctrip.CtripSsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.ctrip.CtripUserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.ctrip.CtripUserService;
import com.ctrip.framework.apollo.portal.extend.defaultimpl.DefaultLogoutHandler;
import com.ctrip.framework.apollo.portal.extend.defaultimpl.DefaultSsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.defaultimpl.DefaultUserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.defaultimpl.DefaultUserService;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
......@@ -33,15 +33,11 @@ import java.util.Map;
import javax.servlet.Filter;
/**
* sso相关的配置.
*/
@Configuration
public class AuthConfiguration {
/**
* 在ctrip内部运行时,会指定 spring.profiles.active = ctrip.
* ctrip sso是通过cas实现的,所以需要加载相关的filter和listener.
* spring.profiles.active = ctrip
*/
@Configuration
@Profile("ctrip")
......
package com.ctrip.framework.apollo.portal.customize;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.ctrip.framework.apollo.common.customize.LoggingCustomizer;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
......
package com.ctrip.framework.apollo.portal.auth.ctrip;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.ctrip.framework.apollo.portal.auth.LogoutHandler;
import com.ctrip.framework.apollo.portal.extend.LogoutHandler;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.ctrip.framework.apollo.portal.auth.ctrip;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.ctrip.framework.apollo.portal.auth.SsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.SsoHeartbeatHandler;
import java.io.IOException;
......
package com.ctrip.framework.apollo.portal.auth.ctrip;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import java.lang.reflect.Method;
......
package com.ctrip.framework.apollo.portal.auth.ctrip;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
......@@ -6,7 +6,7 @@ import com.google.common.collect.Maps;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
......
package com.ctrip.framework.apollo.portal.configuration;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.google.common.base.Strings;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.filters.RecordAccessUserFilter;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.ctrip.filters.RecordAccessUserFilter;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.ctrip.framework.apollo.portal.filters;
package com.ctrip.framework.apollo.portal.extend.ctrip.filters;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.dianping.cat.Cat;
......
package com.ctrip.framework.apollo.portal.auth.defaultimpl;
package com.ctrip.framework.apollo.portal.extend.defaultimpl;
import com.ctrip.framework.apollo.portal.auth.LogoutHandler;
import com.ctrip.framework.apollo.portal.extend.LogoutHandler;
import java.io.IOException;
......
package com.ctrip.framework.apollo.portal.auth.defaultimpl;
package com.ctrip.framework.apollo.portal.extend.defaultimpl;
import com.ctrip.framework.apollo.portal.auth.SsoHeartbeatHandler;
import com.ctrip.framework.apollo.portal.extend.SsoHeartbeatHandler;
import java.io.IOException;
......
package com.ctrip.framework.apollo.portal.auth.defaultimpl;
package com.ctrip.framework.apollo.portal.extend.defaultimpl;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
/**
......
package com.ctrip.framework.apollo.portal.auth.defaultimpl;
package com.ctrip.framework.apollo.portal.extend.defaultimpl;
import com.google.common.collect.Lists;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import java.util.Arrays;
import java.util.List;
......
/**
* The interfaces under the extend package, each company should own to implement.
* Other companies can ignore the implementation under the Ctrip package.
* In addition, we provide the default implementation of the interface under the default package.
*
*/
package com.ctrip.framework.apollo.portal.extend;
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.AppDTO;
import com.ctrip.framework.apollo.common.dto.AppNamespaceDTO;
import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.PortalSettings;
import com.ctrip.framework.apollo.portal.components.PortalSettings;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.dianping.cat.Cat;
......
......@@ -5,7 +5,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.repository.AppNamespaceRepository;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.utils.BeanUtils;
import com.ctrip.framework.apollo.common.utils.ExceptionUtils;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo;
import com.ctrip.framework.apollo.portal.repository.AppRepository;
......
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.dianping.cat.Cat;
......
package com.ctrip.framework.apollo.portal.service;
import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserService;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.Favorite;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.repository.FavoriteRepository;
......
......@@ -10,12 +10,12 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel;
import com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier;
import com.ctrip.framework.apollo.portal.service.txtresolver.ConfigTextResolver;
import com.ctrip.framework.apollo.portal.components.txtresolver.ConfigTextResolver;
import com.dianping.cat.Cat;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -8,8 +8,8 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import com.ctrip.framework.apollo.common.exception.BadRequestException;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.PermissionValidator;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.components.PermissionValidator;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.components.ItemsComparator;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO;
......
......@@ -13,7 +13,7 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO;
import com.dianping.cat.Cat;
......
......@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.core.utils.StringUtils;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.CatEventType;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel;
import com.ctrip.framework.apollo.portal.entity.vo.KVEntity;
......
......@@ -6,7 +6,7 @@ import com.google.common.collect.Sets;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.PermissionType;
import com.ctrip.framework.apollo.portal.constant.RoleType;
import com.ctrip.framework.apollo.portal.entity.po.Permission;
......
......@@ -12,8 +12,8 @@ import com.ctrip.framework.apollo.portal.service.ConfigServiceTest;
import com.ctrip.framework.apollo.portal.service.NamespaceServiceTest;
import com.ctrip.framework.apollo.portal.service.RoleInitializationServiceTest;
import com.ctrip.framework.apollo.portal.service.RolePermissionServiceTest;
import com.ctrip.framework.apollo.portal.service.txtresolver.FileTextResolverTest;
import com.ctrip.framework.apollo.portal.service.txtresolver.PropertyResolverTest;
import com.ctrip.framework.apollo.portal.components.txtresolver.FileTextResolverTest;
import com.ctrip.framework.apollo.portal.components.txtresolver.PropertyResolverTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
......
......@@ -3,8 +3,8 @@ package com.ctrip.framework.apollo.portal;
import com.ctrip.framework.apollo.core.dto.ServiceDTO;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import com.ctrip.framework.apollo.portal.api.AdminServiceAddressLocator;
import com.ctrip.framework.apollo.portal.api.RetryableRestTemplate;
import com.ctrip.framework.apollo.portal.components.AdminServiceAddressLocator;
import com.ctrip.framework.apollo.portal.components.RetryableRestTemplate;
import org.apache.http.HttpHost;
import org.apache.http.conn.ConnectTimeoutException;
......
......@@ -21,7 +21,7 @@ import org.springframework.web.client.HttpStatusCodeException;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.common.exception.ServiceException;
import com.ctrip.framework.apollo.portal.controller.AppController;
import com.ctrip.framework.apollo.portal.service.UserService;
import com.ctrip.framework.apollo.portal.extend.UserService;
import com.google.gson.Gson;
......
package com.ctrip.framework.apollo.portal.service.txtresolver;
package com.ctrip.framework.apollo.portal.components.txtresolver;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.common.dto.ItemChangeSets;
......
package com.ctrip.framework.apollo.portal.service.txtresolver;
package com.ctrip.framework.apollo.portal.components.txtresolver;
import com.ctrip.framework.apollo.common.dto.ItemChangeSets;
......
......@@ -2,7 +2,7 @@ package com.ctrip.framework.apollo.portal.controller;
import com.ctrip.framework.apollo.openapi.entity.ConsumerToken;
import com.ctrip.framework.apollo.openapi.service.ConsumerService;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import org.junit.Before;
......@@ -56,4 +56,4 @@ public class ConsumerControllerTest {
verify(consumerService, times(1)).createConsumerToken(any(ConsumerToken.class));
}
}
\ No newline at end of file
}
package com.ctrip.framework.apollo.portal.auth.ctrip;
package com.ctrip.framework.apollo.portal.extend.ctrip;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.ctrip.framework.apollo.portal.AbstractUnitTest;
import com.ctrip.framework.apollo.portal.auth.ctrip.CtripUserService;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.service.ServerConfigService;
......
......@@ -7,12 +7,12 @@ import com.ctrip.framework.apollo.common.dto.NamespaceDTO;
import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.entity.po.UserInfo;
import com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier;
import com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel;
import com.ctrip.framework.apollo.portal.service.txtresolver.PropertyResolver;
import com.ctrip.framework.apollo.portal.components.txtresolver.PropertyResolver;
import org.junit.Assert;
import org.junit.Before;
......
......@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.core.enums.ConfigFileFormat;
import com.ctrip.framework.apollo.core.enums.Env;
import com.ctrip.framework.apollo.portal.api.AdminServiceAPI;
import com.ctrip.framework.apollo.portal.entity.vo.NamespaceVO;
import com.ctrip.framework.apollo.portal.service.txtresolver.PropertyResolver;
import com.ctrip.framework.apollo.portal.components.txtresolver.PropertyResolver;
import org.junit.Before;
import org.junit.Test;
......
......@@ -4,7 +4,7 @@ import com.google.common.collect.Sets;
import com.ctrip.framework.apollo.common.entity.App;
import com.ctrip.framework.apollo.portal.AbstractUnitTest;
import com.ctrip.framework.apollo.portal.auth.UserInfoHolder;
import com.ctrip.framework.apollo.portal.extend.UserInfoHolder;
import com.ctrip.framework.apollo.portal.constant.PermissionType;
import com.ctrip.framework.apollo.portal.entity.po.Permission;
import com.ctrip.framework.apollo.portal.entity.po.Role;
......@@ -16,7 +16,6 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anySet;
import static org.mockito.Matchers.anySetOf;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.times;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment