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


Java WindowState.equals方法代码示例

本文整理汇总了Java中javax.portlet.WindowState.equals方法的典型用法代码示例。如果您正苦于以下问题:Java WindowState.equals方法的具体用法?Java WindowState.equals怎么用?Java WindowState.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.portlet.WindowState的用法示例。


在下文中一共展示了WindowState.equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import javax.portlet.WindowState; //导入方法依赖的package包/类
public ModelExport execute(AppData data, Connection conn)
		throws ConfigurationException, SQLException, IOException
{
	WindowState state = data.renderRequest.getWindowState();
	if (!state.equals(WindowState.MINIMIZED))
	{
		PortletMode mode = data.renderRequest.getPortletMode();
		if (PortletMode.VIEW.equals(mode))
		{
			return this.view;
		}
		else if (PortletMode.EDIT.equals(mode))
		{
			return this.edit;
		}
		else if (PortletMode.HELP.equals(mode))
		{
			return this.help;
		}
		else
		{
			log.error("Unknown portlet mode: " + mode + ".");
		}
	}
	return null;
}
 
开发者ID:micromagic,项目名称:eterna,代码行数:27,代码来源:RenderExecute.java

示例2: checkEqualStateAwareResponse

import javax.portlet.WindowState; //导入方法依赖的package包/类
public boolean checkEqualStateAwareResponse(
      StateAwareResponse injectedPortletArtifact,
      StateAwareResponse stateAwareResponse) {
   if (injectedPortletArtifact.equals(stateAwareResponse)) {
      return true;
   }
   PortletMode injectedPortletMode = injectedPortletArtifact
         .getPortletMode();
   PortletMode portletPortletMode = stateAwareResponse.getPortletMode();
   WindowState injectedWindowState = injectedPortletArtifact
         .getWindowState();
   WindowState portletWindowState = stateAwareResponse.getWindowState();
   MutableRenderParameters injectedMutableRenderParams = injectedPortletArtifact
         .getRenderParameters();
   MutableRenderParameters portletMutableRenderParams = stateAwareResponse
         .getRenderParameters();
   if (checkEqualResponses(injectedPortletArtifact, stateAwareResponse)
         && injectedPortletMode.equals(portletPortletMode)
         && injectedWindowState.equals(portletWindowState)
         && checkEqualParameters(injectedMutableRenderParams,
               portletMutableRenderParams)) {
      return true;
   } else {
      return false;
   }
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:27,代码来源:Utils.java

示例3: setBankTest

import javax.portlet.WindowState; //导入方法依赖的package包/类
public void setBankTest(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception{
	
	long actId = ParamUtil.getLong(actionRequest, "actId", 0);
	String redirect = actionRequest.getParameter("redirect");
	String isMultiple = ParamUtil.getString(actionRequest, "banks-multipleselections", "false");
	String isBank = ParamUtil.getString(actionRequest, "is-bank", "false"); 
	String assetCategoryIds = ParamUtil.getString(actionRequest, "assetCategoryIds", StringPool.BLANK);
	long[] longCategoryIds = GetterUtil.getLongValues(StringUtil.split(assetCategoryIds));
	
	AssetEntryQuery entryQuery = new AssetEntryQuery();
	entryQuery.setAllCategoryIds(longCategoryIds);
	
	if(!Validator.equals(AssetEntryLocalServiceUtil.getEntries(entryQuery).size(), 0)){
		LearningActivityLocalServiceUtil.setExtraContentValue(actId,"isBank", isBank);
		LearningActivityLocalServiceUtil.setExtraContentValue(actId,"isMultiple", isMultiple);
		if(!StringPool.BLANK.equals(assetCategoryIds)){
			LearningActivityLocalServiceUtil.setExtraContentValue(actId,"categoriesId", assetCategoryIds);
			SessionMessages.add(actionRequest,"data-exist-for-these-categories");
		}else{
			SessionErrors.add(actionRequest, "error-selector-categories-empty");
		}
	}else{
		SessionErrors.add(actionRequest, "error-not-results");
	}
	
	WindowState windowState = actionRequest.getWindowState();
	if (Validator.isNotNull(redirect)) {
		if (!windowState.equals(LiferayWindowState.POP_UP)) {
			actionResponse.sendRedirect(redirect);
		}
		else {
			redirect = PortalUtil.escapeRedirect(redirect);
			if (Validator.isNotNull(redirect)) {
				actionResponse.sendRedirect(redirect);
			}
		}
	}
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:40,代码来源:ExecActivity.java

示例4: hasField

import javax.portlet.WindowState; //导入方法依赖的package包/类
/**
 * Returns true if the class under test has a field by the specified name and value.
 * 
 * @param fname
 *           Field name
 * @param value
 *           Field value
 * @return true if the class under test defines the field with the specified value
 */
public boolean hasField(String fname, WindowState value) {
   boolean result = false;

   try {
      Field f = cut.getField(fname);
      WindowState fValue = (WindowState) f.get(null);
      if (fValue.equals(value)) {
         result = true;
      }
   } catch (Exception e) {
   }

   return result;
}
 
开发者ID:apache,项目名称:portals-pluto,代码行数:24,代码来源:ClassChecker.java

示例5: deleteMyTries

import javax.portlet.WindowState; //导入方法依赖的package包/类
public void deleteMyTries(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
	
	log.debug("***deleteMyTries***");
	
	long actId = ParamUtil.getLong(actionRequest, "resId", 0);
	String redirect = ParamUtil.getString(actionRequest, "redirect");
	
	if(actId>0){
	LearningActivity larn=LearningActivityLocalServiceUtil.getLearningActivity(actId);
	ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
	actionResponse.setRenderParameters(actionRequest.getParameterMap());
	actionRequest.setAttribute("editing", "true");
	LearningActivityTryLocalServiceUtil.deleteUserTries(actId, themeDisplay.getUserId());
	
	if(P2pActivityLocalServiceUtil.existP2pAct(actId, themeDisplay.getUserId())){
		P2pActivity p2pact=P2pActivityLocalServiceUtil.findByActIdAndUserId(actId, themeDisplay.getUserId());
		P2pActivityLocalServiceUtil.deleteP2pActivity(p2pact.getP2pActivityId());			
		java.util.List<P2pActivityCorrections> p2pactcorrcs=P2pActivityCorrectionsLocalServiceUtil.findByP2pActivityId(p2pact.getP2pActivityId());
		
		for(P2pActivityCorrections p2pactcorr:p2pactcorrcs){
			P2pActivityCorrectionsLocalServiceUtil.deleteP2pActivityCorrections(p2pactcorr);
		}			
		}
		
	actionRequest.setAttribute("activity", larn);
	}
	WindowState windowState = actionRequest.getWindowState();
	if (redirect != null && !"".equals(redirect)) {
		if (!windowState.equals(LiferayWindowState.POP_UP)) {
			actionResponse.sendRedirect(redirect);
		}else {
			redirect = PortalUtil.escapeRedirect(redirect);

			if (Validator.isNotNull(redirect)) {
				actionResponse.sendRedirect(redirect);
			}
		}
	}
	
	SessionMessages.add(actionRequest, "ok-deleting-tries");
	
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:43,代码来源:LmsActivitiesList.java


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