本文整理汇总了Java中com.liferay.portal.util.PortalUtil.copyRequestParameters方法的典型用法代码示例。如果您正苦于以下问题:Java PortalUtil.copyRequestParameters方法的具体用法?Java PortalUtil.copyRequestParameters怎么用?Java PortalUtil.copyRequestParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.util.PortalUtil
的用法示例。
在下文中一共展示了PortalUtil.copyRequestParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addEditUserSync
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void addEditUserSync(ActionRequest request, ActionResponse response) throws SystemException, PortalException, IOException {
if (SessionErrors.isEmpty(request)) {
String appUserName = ParamUtil.getString(request, UserSyncKeys.AddEditAttributes.APP_USERNAME, PortletKeys.TEXT_BOX);
Long editId = ParamUtil.getLong(request, UserSyncKeys.AddEditAttributes.EDIT_ID, PortletKeys.LONG_DEFAULT);
if (editId == PortletKeys.LONG_DEFAULT) {
} else {
UserSync userSync = UserSyncLocalServiceUtil.getUserSync(editId);
userSync.setAppUserName(appUserName);
userSync.setCheckpoint(new Date());
UserSyncLocalServiceUtil.updateUserSync(userSync);
}
}
SessionMessages.add(request, PortalUtil.getPortletId(request) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
}
}
示例2: addEditAppRole
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void addEditAppRole(ActionRequest request, ActionResponse response) throws SystemException, PortalException, IOException {
if (SessionErrors.isEmpty(request)) {
ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext();
long applicationId = ParamUtil.getLong(request, AppRoleKeys.AddEditAttributes.APPLICATION_ID, PortletKeys.LONG_DEFAULT);
String roleCode = ParamUtil.getString(request, AppRoleKeys.AddEditAttributes.ROLE_CODE, PortletKeys.TEXT_BOX);
String roleName = ParamUtil.getString(request, AppRoleKeys.AddEditAttributes.ROLE_NAME, PortletKeys.TEXT_BOX);
Long editId = ParamUtil.getLong(request, AppRoleKeys.AddEditAttributes.EDIT_ID, PortletKeys.LONG_DEFAULT);
if (editId == PortletKeys.LONG_DEFAULT) {
AppRoleLocalServiceUtil.addAppRole(applicationId, roleCode, roleName, serviceContext);
} else {
AppRoleLocalServiceUtil.updateAppRole(editId, applicationId, roleCode, roleName, serviceContext);
}
}
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
}
}
示例3: addEditAppRole
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void addEditAppRole(ActionRequest request, ActionResponse response) throws SystemException, PortalException, IOException {
validateParamsIntoSessionError(request);
if (SessionErrors.isEmpty(request)) {
ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext();
long applicationId = ParamUtil.getLong(request, AppRoleKeys.AddEditAttributes.APPLICATION_ID, PortletKeys.LONG_DEFAULT);
String roleCode = ParamUtil.getString(request, AppRoleKeys.AddEditAttributes.ROLE_CODE, PortletKeys.TEXT_BOX);
String roleName = ParamUtil.getString(request, AppRoleKeys.AddEditAttributes.ROLE_NAME, PortletKeys.TEXT_BOX);
Long editId = ParamUtil.getLong(request, AppRoleKeys.AddEditAttributes.EDIT_ID, PortletKeys.LONG_DEFAULT);
if (editId == PortletKeys.LONG_DEFAULT) {
AppRoleLocalServiceUtil.addAppRole(applicationId, roleCode, roleName, serviceContext);
SessionMessages.add(request, AppRoleKeys.SuccessMessageKeys.ORG_OEP_SSOMGT_PORTLET_APPROLE_SUCCESS_ADDNEW);
} else {
AppRoleLocalServiceUtil.updateAppRole(editId, applicationId, roleCode, roleName, serviceContext);
SessionMessages.add(request, AppRoleKeys.SuccessMessageKeys.ORG_OEP_SSOMGT_PORTLET_APPROLE_SUCCESS_UPDATE);
}
}
SessionMessages.add(request, PortalUtil.getPortletId(request) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
}
}
示例4: edit
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void edit(ActionRequest request, ActionResponse response)
throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request,
JobPosKeys.BaseJobPosAttributes.EDIT_ID,
PortletKeys.LONG_DEFAULT);
JobPos application = JobPosLocalServiceUtil
.getJobPos(editId);
setParameterIntoResponse(response, application);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例5: edit
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void edit(ActionRequest request, ActionResponse response)
throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request,
WorkingUnitKeys.BaseWorkingUnitAttributes.EDIT_ID,
PortletKeys.LONG_DEFAULT);
WorkingUnit application = WorkingUnitLocalServiceUtil
.getWorkingUnit(editId);
setParameterIntoResponse(response, application);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例6: editJobPos
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void editJobPos(ActionRequest request, ActionResponse response)
throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request,
JobPosKeys.BaseJobPosAttributes.EDIT_ID,
PortletKeys.LONG_DEFAULT);
JobPos application = JobPosLocalServiceUtil
.getJobPos(editId);
setParameterIntoResponseJobPos(response, application);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例7: edit
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void edit(ActionRequest request, ActionResponse response)
throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request,
EmployeeKeys.BaseEmployeeAttributes.EDIT_ID,
PortletKeys.LONG_DEFAULT);
Employee empLoyee = EmployeeLocalServiceUtil.getEmployee(editId);
//System.out.println("Toi day " + editId);
setParameterIntoResponse(response, empLoyee);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例8: editApplication
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void editApplication(ActionRequest request, ActionResponse response) throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request, ApplicationKeys.BaseApplicationAttributes.EDIT_ID, PortletKeys.LONG_DEFAULT);
Application application = ApplicationLocalServiceUtil.getApplication(editId);
setParameterIntoResponse(response, application);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例9: addEditJobPos
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void addEditJobPos(ActionRequest request, ActionResponse response)
throws SystemException, PortalException, IOException {
if (SessionErrors.isEmpty(request)) {
ServiceContext serviceContext = ServiceContextThreadLocal
.getServiceContext();
UploadRequest uploadRequest = PortalUtil
.getUploadPortletRequest(request);
long employeeId = ParamUtil.getLong(uploadRequest,EmployeeKeys.BaseEmployeeAttributes.EDIT_ID);
long jobPosId = ParamUtil.getLong(uploadRequest,EmployeeKeys.AddEditAttributes.JOBPOSID);
// Date pingTime = new Date();
if (employeeId != PortletKeys.LONG_DEFAULT && jobPosId != PortletKeys.LONG_DEFAULT) {
//JobPos2RoleLocalServiceUtil.addJobPos2Role(jobPosId, roleId, serviceContext);
EmployeeLocalServiceUtil.addEmployee2JoPos(employeeId, jobPosId);
//System.out.println(" sssss " + name + " " + address);
}
}
PortalUtil.copyRequestParameters(request, response);
/*
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
}
*/
}
示例10: setDefaultJobPos
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void setDefaultJobPos(ActionRequest request, ActionResponse response)
throws SystemException, PortalException, IOException {
System.out.println(" Ngu ngoc " );
long employeeId = ParamUtil.getLong(request,EmployeeKeys.BaseEmployeeAttributes.EDIT_ID);
long mainJobPosId = ParamUtil.getLong(request,EmployeeKeys.AddEditAttributes.MAINJOBPOSID);
// Date pingTime = new Date();
System.out.println(employeeId + " " + mainJobPosId);
if (employeeId != PortletKeys.LONG_DEFAULT && mainJobPosId != PortletKeys.LONG_DEFAULT) {
//JobPos2RoleLocalServiceUtil.addJobPos2Role(jobPosId, roleId, serviceContext);
Employee employee = EmployeeLocalServiceUtil.getEmployee(employeeId);
employee.setMainJobPosId(mainJobPosId);
EmployeeLocalServiceUtil.updateEmployee(employee);
//EmployeeLocalServiceUtil.addEmployee2JoPos(employeeId, jobPosId);
//System.out.println(" sssss " + name + " " + address);
}
PortalUtil.copyRequestParameters(request, response);
/*
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
}
*/
}
示例11: deleteJobPos
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void deleteJobPos(ActionRequest request, ActionResponse response)
throws SystemException, PortalException, IOException {
if (SessionErrors.isEmpty(request)) {
ServiceContext serviceContext = ServiceContextThreadLocal
.getServiceContext();
UploadRequest uploadRequest = PortalUtil
.getUploadPortletRequest(request);
long employeeId = ParamUtil.getLong(uploadRequest,EmployeeKeys.BaseEmployeeAttributes.EDIT_ID);
long jobPosId = ParamUtil.getLong(uploadRequest,EmployeeKeys.BaseEmployeeAttributes.DELETE_ID);
System.out.println(" Xoa " + employeeId + " " + jobPosId);
// Date pingTime = new Date();
if (employeeId != PortletKeys.LONG_DEFAULT && jobPosId != PortletKeys.LONG_DEFAULT) {
//JobPos2RoleLocalServiceUtil.addJobPos2Role(jobPosId, roleId, serviceContext);
EmployeeLocalServiceUtil.removeJobPos(employeeId, jobPosId);
//System.out.println(" sssss " + name + " " + address);
}
}
PortalUtil.copyRequestParameters(request, response);
/*
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
}
*/
}
示例12: editAppRole
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void editAppRole(ActionRequest request, ActionResponse response) throws PortalException, SystemException, IOException {
long editId = ParamUtil.getLong(request, AppRoleKeys.AddEditAttributes.EDIT_ID, PortletKeys.LONG_DEFAULT);
AppRole appRole = AppRoleLocalServiceUtil.getAppRole(editId);
setParameterIntoResponse(response, appRole);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request, PortletKeys.REDIRECT_PAGE));
SessionMessages.add(request, AppRoleKeys.SuccessMessageKeys.ORG_OEP_SSOMGT_PORTLET_APPROLE_SUCCESS_UPDATE);
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例13: addEdit
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void addEdit(ActionRequest request, ActionResponse response)
throws SystemException, PortalException, IOException {
if (SessionErrors.isEmpty(request)) {
ServiceContext serviceContext = ServiceContextThreadLocal
.getServiceContext();
UploadRequest uploadRequest = PortalUtil
.getUploadPortletRequest(request);
String title = ParamUtil.getString(uploadRequest,JobPosKeys.AddEditAttributes.TITLE, PortletKeys.TEXT_BOX);
String positionCatNo = ParamUtil.getString(uploadRequest,JobPosKeys.AddEditAttributes.POSITIONCATNO, PortletKeys.TEXT_BOX);
long workingUnitId = ParamUtil.getLong(uploadRequest,JobPosKeys.AddEditAttributes.WORKINGUNITID);
long subWorkingUnitId = ParamUtil.getLong(uploadRequest,JobPosKeys.AddEditAttributes.SUBWORKINGUNITID);
int leader = ParamUtil.getInteger(uploadRequest,JobPosKeys.AddEditAttributes.LEADER);
Long editId = ParamUtil.getLong(uploadRequest,
JobPosKeys.AddEditAttributes.EDIT_ID,
PortletKeys.LONG_DEFAULT);
// Date pingTime = new Date();
if (editId == PortletKeys.LONG_DEFAULT) {
JobPosLocalServiceUtil.addJobPos(title, positionCatNo, workingUnitId,subWorkingUnitId, leader, serviceContext);
//System.out.println(" sssss " + name + " " + address);
} else {
JobPos jobPos = JobPosLocalServiceUtil
.getJobPos(editId);
JobPosLocalServiceUtil.saveJobPos(jobPos,
serviceContext);
}
}
if (!SessionErrors.isEmpty(request)) {
PortalUtil.copyRequestParameters(request, response);
} else {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
}
}
示例14: testLdap
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void testLdap(ActionRequest request, ActionResponse response) throws Exception{
ManagerLdap tg = new ManagerLdap();
User user = UserLocalServiceUtil.getUser(30115);
ServiceContext serviceContext = ServiceContextThreadLocal
.getServiceContext();
//tg.ExportToLdap(serviceContext, user);//(serviceContext,user);
// tg.look();
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}
示例15: listChucDanh
import com.liferay.portal.util.PortalUtil; //导入方法依赖的package包/类
public void listChucDanh(ActionRequest request, ActionResponse response)
throws PortalException, SystemException, IOException {
//long workingId = ParamUtil.getLong(request,
// WorkingUnitKeys.AddEditAttributes.WORKINGUNITID,
// PortletKeys.LONG_DEFAULT);
//
//WorkingUnitLocalServiceUtil.removeWorkingUnit(deleteId);
if (!SessionErrors.isEmpty(request)) {
response.sendRedirect(ParamUtil.getString(request,
PortletKeys.REDIRECT_PAGE));
} else {
PortalUtil.copyRequestParameters(request, response);
}
}