当前位置: 首页>>代码示例>>Java>>正文


Java PortalUtil.copyRequestParameters方法代码示例

本文整理汇总了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));
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:21,代码来源:UserSyncPortlet.java

示例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));
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:22,代码来源:AppRolePortlet.java

示例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));
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:26,代码来源:AppRolePortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:18,代码来源:JobPosPortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:18,代码来源:WorkingUnitPortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:18,代码来源:WorkingUnitPortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:17,代码来源:EmpLoyeePortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:13,代码来源:ApplicationManagementPortlet.java

示例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));
	}
	*/
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:29,代码来源:EmpLoyeePortlet.java

示例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));
	}
	*/
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:31,代码来源:EmpLoyeePortlet.java

示例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));
	}
	*/
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:30,代码来源:EmpLoyeePortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:14,代码来源:AppRolePortlet.java

示例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));
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:37,代码来源:JobPosPortlet.java

示例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);
	}
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:WorkingUnitPortlet.java

示例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);
		}
	}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:16,代码来源:WorkingUnitPortlet.java


注:本文中的com.liferay.portal.util.PortalUtil.copyRequestParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。