use of com.akaxin.site.business.impl.hai.HttpSiteConfigService in project openzaly by akaxincom.
the class HttpRequestService method process.
public CommandResponse process(Command command) {
HttpUriAction huaEnum = HttpUriAction.getUriActionEnum(command.getUri());
command.setMethod(huaEnum.getMethod());
CommandResponse response = null;
try {
switch(huaEnum) {
case HAI_USER_UPDATE:
case HAI_USER_SEALUP:
if (!checkPermissions(command.getSiteUserId())) {
break;
}
case HAI_USER_LIST:
case HAI_USER_SEARCH:
case HAI_USER_PROFILE:
case HAI_USER_RELATIONLIST:
return new HttpUserService().execute(command);
case HAI_GROUP_LIST:
case HAI_GROUP_PROFILE:
case HAI_GROUP_MEMBERS:
case HAI_GROUP_ADDMEMBER:
case HAI_GROUP_DELETE:
case HAI_GROUP_REMOVEMEMBER:
case HAI_GROUP_SETADMIN:
case HAI_GROUP_UPDATEPROFILE:
case HAI_GROUP_NONMEMBERS:
if (checkPermissions(command.getSiteUserId())) {
response = new HttpGroupService().execute(command);
}
break;
case HAI_FRIEND_APPLY:
response = new HttpFriendService().execute(command);
break;
case HAI_SITE_GETCONFIG:
case HAI_SITE_UPDATECONFIG:
if (checkPermissions(command.getSiteUserId())) {
response = new HttpSiteConfigService().execute(command);
}
break;
case HAI_PLUGIN_ADD:
case HAI_PLUGIN_DELETE:
case HAI_PLUGIN_DISABLE:
case HAI_PLUGIN_LIST:
case HAI_PLUGIN_PROFILE:
case HAI_PLUGIN_UPDATE:
case HAI_PLUGIN_UPDATESTATUS:
if (checkPermissions(command.getSiteUserId())) {
response = new HttpPluginService().execute(command);
}
break;
case HAI_UIC_CREATE:
case HAI_UIC_INFO:
case HAI_UIC_LIST:
if (checkPermissions(command.getSiteUserId())) {
response = new HttpUICService().execute(command);
}
break;
default:
logger.error("error http request command={}", command.toString());
break;
}
} catch (Exception e) {
logger.error("http request service error.", e);
}
if (response == null) {
response = new CommandResponse();
}
return response.setVersion(CommandConst.PROTOCOL_VERSION).setAction(CommandConst.ACTION_RES);
}
Aggregations