本文整理汇总了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;
}
示例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;
}
}
示例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);
}
}
}
}
示例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;
}
示例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");
}