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


Java ActionMapping类代码示例

本文整理汇总了Java中org.springframework.web.portlet.bind.annotation.ActionMapping的典型用法代码示例。如果您正苦于以下问题:Java ActionMapping类的具体用法?Java ActionMapping怎么用?Java ActionMapping使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ActionMapping类属于org.springframework.web.portlet.bind.annotation包,在下文中一共展示了ActionMapping类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyOffer

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Copy offer.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=copyOffer")
public void copyOffer(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long offerId = this.getOfferId(request);
	m_objLog.debug("copyOffer::start(" + offerId + ")");

	// ThemeDisplay themeDisplay = (ThemeDisplay)
	// request.getAttribute(WebKeys.THEME_DISPLAY);

	final OfferForm offer = CustomOfferServiceHandler.getOffer(offerId);
	offer.setOfferId(-1);

	model.addAttribute("countries", CustomPersistanceServiceHandler
	        .getDataList(E_CategoryType.COUNTRIES, true));
	model.addAttribute("workhours", CustomPersistanceServiceHandler
	        .getDataList(E_CategoryType.OFFERTIME, false));
	model.addAttribute("data", offer);
	response.setRenderParameter("jspPage", "../shared/offer");

	m_objLog.debug("copyOffer::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:29,代码来源:MainController.java

示例2: deleteOrganisation

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Delete organisation.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=deleteOrganisation")
public void deleteOrganisation(final ActionRequest request,
        final ActionResponse response, final Model model) {
	if (Constants.RESTRICT_TO_DEMO) {
		m_objLog.debug("deleteOrganisation::denied()");
		SessionErrors.add(request, "common.demo.denied");
		return;
	}
	
	final Long orgId = this.getOrgId(request);
	m_objLog.debug("deleteOrganisation::start(" + orgId + ")");

	if (orgId >= 0) {
		CustomOrgServiceHandler.deleteOrganisation(orgId);
	}

	m_objLog.debug("deleteOrganisation::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:26,代码来源:MainController.java

示例3: editOffer

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Edits the offer.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=editOffer")
public void editOffer(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long offerId = this.getOfferId(request);
	m_objLog.debug("editOffer::start(" + offerId + ")");

	final ThemeDisplay themeDisplay = (ThemeDisplay) request
	        .getAttribute(WebKeys.THEME_DISPLAY);

	if (offerId != null) {
		final OfferForm form = CustomOfferServiceHandler
		        .getOfferForEdit(offerId);
		m_objLog.info("Edit offer serving offer form " + form.getOfferId());
		model.addAttribute("data", form);
		model.addAttribute("workhours", CustomPersistanceServiceHandler
		        .getDataList(E_CategoryType.OFFERTIME, false));
		response.setRenderParameter("jspPage", "../shared/offer");
		response.setRenderParameter("actionType", "edit");
		CustomLockServiceHandler.lock(AHOffer.class.getName(),
		        form.getOfferId(), themeDisplay);
	}

	m_objLog.debug("editOffer::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:32,代码来源:MainController.java

示例4: saveOffer

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Save offer.
 *
 * @param data the data
 * @param result the result
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=saveOffer")
public void saveOffer(@Valid @ModelAttribute("data") final OfferForm data,
        final BindingResult result, final ActionRequest request,
        final ActionResponse response, final Model model) {
	m_objLog.debug("saveOffer::start(" + data.getOfferId() + ")");

	final ThemeDisplay themeDisplay = (ThemeDisplay) request
	        .getAttribute(WebKeys.THEME_DISPLAY);

	this.m_objOfferFormValidator.setThemeDisplay(themeDisplay);
	this.m_objOfferFormValidator.validate(data, result);

	if (!result.hasErrors()) {
		CustomOfferServiceHandler.addOffer(data);
		CustomLockServiceHandler.unlock(AHOffer.class.getName(),
		        data.getOfferId(), themeDisplay);
		data.clear();
	} else {
		response.setRenderParameter("actionType", "edit");
		response.setRenderParameter("jspPage", "../shared/offer");
	}

	m_objLog.debug("saveOffer::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:34,代码来源:MainController.java

示例5: saveOrganisation

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Save organisation.
 *
 * @param data the data
 * @param result the result
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=saveOrganisation")
public void saveOrganisation(
        @Valid @ModelAttribute("orgData") final RegistrationForm data,
        final BindingResult result, final ActionRequest request,
        final ActionResponse response, final Model model) {
	m_objLog.debug("saveOrganisation::start");

	if (!result.hasErrors()) {
		CustomOrgServiceHandler.addOrganisation(this.getCompanyId(request),
		        this.getUserId(request), this.getGroupId(request), data);
	} else {
		m_objLog.info("Errors in form!");
		final List<ObjectError> errors = result.getAllErrors();
		for (final ObjectError error : errors) {
			m_objLog.info("Got error " + error.getClass().getName() + " : "
			        + error);
		}
	}

	response.setRenderParameter("tabId", "profile");
	response.setRenderParameter("setModel", Boolean.FALSE.toString());
	m_objLog.debug("saveOrganisation::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:33,代码来源:MainController.java

示例6: unlock

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Unlock.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=unlock")
public void unlock(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long offerId = this.getOfferId(request);
	m_objLog.debug("unlock::start(" + offerId + ")");

	if (offerId != null && offerId >= 0) {
		final ThemeDisplay themeDisplay = (ThemeDisplay) request
		        .getAttribute(WebKeys.THEME_DISPLAY);
		CustomLockServiceHandler.unlock(AHOffer.class.getName(), offerId,
		        themeDisplay);
	}

	m_objLog.debug("unlock::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:23,代码来源:MainController.java

示例7: viewOffer

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * View offer.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=viewOffer")
public void viewOffer(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long offerId = this.getOfferId(request);
	m_objLog.debug("viewOffer::start(" + offerId + ")");

	if (offerId != null) {
		final OfferForm form = CustomOfferServiceHandler.getOffer(offerId);
		model.addAttribute("data", form);
		response.setRenderParameter("jspPage", "../shared/offer");
		response.setRenderParameter("actionType", "view");
	}

	m_objLog.debug("viewOffer::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:23,代码来源:MainController.java

示例8: approveSub

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Approve sub.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=approveSub")
public void approveSub(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long subId = this.getSubId(request);
	m_objLog.debug("approveSub::start(" + subId + ")");

	final String uuid = request.getParameter("uuid");
	if (uuid != null) {
		response.setRenderParameter("uuid", uuid);
	}
	if (subId != null) {
		AHSubscriptionLocalServiceUtil.setSubscriptionStatus(subId,
		        E_SubscriptionStatus.VALIDATED);
	}

	m_objLog.debug("approveSub::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:25,代码来源:MainController.java

示例9: deleteSub

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Delete sub.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=deleteSub")
public void deleteSub(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long subId = this.getSubId(request);
	m_objLog.debug("deleteSub::start(" + subId + ")");

	final String uuid = request.getParameter("uuid");
	if (uuid != null) {
		response.setRenderParameter("uuid", uuid);
	}
	if (subId != null) {
		AHSubscriptionLocalServiceUtil.removeSubscription(subId);
	}

	m_objLog.debug("deleteSub::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:24,代码来源:MainController.java

示例10: addUser

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Adds the user.
 *
 * @param form the form
 * @param result the result
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=addUser")
public void addUser(
        @Valid @ModelAttribute("data") final NewsletterForm form,
        final BindingResult result, final ActionRequest request,
        final ActionResponse response, final Model model) {
	m_objLog.debug("addUser::start");

	if (!result.hasErrors()) {
		final AHSubscription sub = CustomPersistanceServiceHandler
		        .addSubscription(form);
		m_objLog.info("New user with id: " + sub.getUuid());
		response.setRenderParameter("jspPage", "registerSuccess");
	}

	m_objLog.debug("addUser::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:26,代码来源:RegistrationController.java

示例11: deleteOrg

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Delete org.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=deleteOrg")
public void deleteOrg(final ActionRequest request,
        final ActionResponse response, final Model model) {
	
	if (Constants.RESTRICT_TO_DEMO) {
		m_objLog.debug("deleteOrg::denied()");
		SessionErrors.add(request, "common.demo.denied");
		return;
	}
	
	m_objLog.debug("deleteOrg::start");

	
	
	final Long l_orgId = this.getOrgId(request);
	if (l_orgId != null) {
		AHOrgLocalServiceUtil.deleteOrganisation(l_orgId);
	}

	m_objLog.debug("deleteOrg::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:29,代码来源:ManagementController.java

示例12: disableOrg

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Disable org.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=disableOrg")
public void disableOrg(final ActionRequest request,
        final ActionResponse response, final Model model) {
	if (Constants.RESTRICT_TO_DEMO) {
		m_objLog.debug("disableOrg::denied()");
		SessionErrors.add(request, "common.demo.denied");
		return;
	}
	
	m_objLog.debug("disableOrg::start");

	final Long l_orgId = this.getOrgId(request);
	if (l_orgId != null) {
		AHOrgLocalServiceUtil.setOrganisationStatus(l_orgId,
		        E_OrgStatus.DISABLED.getIntValue());
	}

	m_objLog.debug("disableOrg::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:27,代码来源:ManagementController.java

示例13: editOffer

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Edits the offer.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=editOffer")
public void editOffer(final ActionRequest request,
        final ActionResponse response, final Model model) {
	final Long offerId = this.getOfferId(request);
	m_objLog.debug("editOffer::start(" + offerId + ")");

	if (offerId != null) {
		final ThemeDisplay themeDisplay = (ThemeDisplay) request
		        .getAttribute(WebKeys.THEME_DISPLAY);
		final OfferForm form = CustomOfferServiceHandler.getOffer(offerId);
		m_objLog.debug("Edit offer with agency contact: "
		        + form.isRequireAgencyContact());
		model.addAttribute("data", form);
		response.setRenderParameter("jspPage", "../shared/offer");
		response.setRenderParameter("actionType", "approve");
		CustomLockServiceHandler.lock(AHOffer.class.getName(),
		        form.getOfferId(), themeDisplay);
	}

	m_objLog.debug("editOffer::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:29,代码来源:ManagementController.java

示例14: exportOrgs

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Export orgs.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=exportOrg")
public void exportOrgs(final ActionRequest request,
        final ActionResponse response, final Model model) {
	m_objLog.debug("exportOrgs::start");

	this.copyRenderParameter("page", request, response);
	this.copyRenderParameter("tabId", request, response);

	this.sendFile("organisations.csv",
	        "application/comma-separated-values",
	        CustomOrgServiceHandler.getOrganisationsAsCsv(), request,
	        response);

	m_objLog.debug("exportOrgs::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:23,代码来源:ManagementController.java

示例15: exportUser

import org.springframework.web.portlet.bind.annotation.ActionMapping; //导入依赖的package包/类
/**
 * Export user.
 *
 * @param request the request
 * @param response the response
 * @param model the model
 */
@ActionMapping(params = "action=exportUser")
public void exportUser(final ActionRequest request,
        final ActionResponse response, final Model model) {
	if (Constants.RESTRICT_TO_DEMO) {
		m_objLog.debug("exportUser::denied()");
		SessionErrors.add(request, "common.demo.denied");
		return;
	}
	
	m_objLog.debug("exportUser::start");

	this.copyRenderParameter("page", request, response);
	this.copyRenderParameter("tabId", request, response);

	this.sendFile("users.csv", "application/comma-separated-values",
	        CustomPersistanceServiceHandler.getUsersAsCsv(), request,
	        response);

	m_objLog.debug("exportUser::end");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:28,代码来源:ManagementController.java


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