All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.anotheria.anosite.gen.aswebdata.action.MultiOpPagexsScriptsAction Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
/**
 ********************************************************************************
 *** MultiOpPagexsScriptsAction.java                                          ***
 *** generated by AnoSiteGenerator (ASG), Version: 3.2.2                      ***
 *** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net               ***
 *** All Rights Reserved.                                                     ***
 ********************************************************************************
 *** Don't edit this code, if you aren't sure                                 ***
 *** that you do exactly know what you are doing!                             ***
 *** It's better to invest time in the generator, as into the generated code. ***
 ********************************************************************************
 */

package net.anotheria.anosite.gen.aswebdata.action;

import java.util.List;
import java.util.ArrayList;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import net.anotheria.maf.action.ActionCommand;
import net.anotheria.maf.action.ActionMapping;
import net.anotheria.anosite.gen.aswebdata.data.PagexFactory;
import net.anotheria.anosite.gen.aswebdata.data.Pagex;
import net.anotheria.anosite.gen.aswebdata.bean.ScriptsElementFB;
import net.anotheria.asg.util.bean.PopulateUtility;
import net.anotheria.anosite.gen.aswebdata.bean.ScriptsQuickAddFB;
import net.anotheria.anosite.gen.assitedata.data.Script;
import net.anotheria.anosite.gen.assitedata.data.ScriptSortType;
import net.anotheria.webutils.bean.LabelValueBean;
import net.anotheria.anodoc.data.NoSuchDocumentException;
import net.anotheria.util.StringUtils;
import net.anotheria.asg.exception.ASGRuntimeException;

public class MultiOpPagexsScriptsAction extends BasePagexAction{

	// Generated by: class net.anotheria.asg.generator.view.action.ModuleActionsGenerator.generateContainerMultiOpAction

	public ActionCommand anoDocExecute(ActionMapping mapping, HttpServletRequest req, HttpServletResponse res) throws Exception{
		String path = stripPath(mapping.getPath());
		if (path.equals("aswebdataPagexScriptsShow"))
			return aswebdataPagexScriptsShow(mapping, req, res);
		if (path.equals("aswebdataPagexScriptsAdd"))
			return aswebdataPagexScriptsAdd(mapping, req, res);
		if (path.equals("aswebdataPagexScriptsDelete"))
			return aswebdataPagexScriptsDelete(mapping, req, res);
		if (path.equals("aswebdataPagexScriptsMove"))
			return aswebdataPagexScriptsMove(mapping, req, res);
		if (path.equals("aswebdataPagexScriptsQuickAdd"))
			return aswebdataPagexScriptsQuickAdd(mapping, req, res);
		throw new IllegalArgumentException("Unknown path: "+path);
	}

	// Generated by: class net.anotheria.asg.generator.view.action.ModuleActionsGenerator.generateListShowActionMethod

	public ActionCommand aswebdataPagexScriptsShow(ActionMapping mapping, HttpServletRequest req, HttpServletResponse res) throws Exception{
		String id = getStringParameter(req, "ownerId");
		Pagex pagex = getASWebDataService().getPagex(id);
		addBeanToRequest(req, "ownerId", id);
		checkPagexs(pagex, req);

		ScriptsElementFB form = new ScriptsElementFB() ;
		form.setPosition(-1);
		form.setOwnerId(pagex.getId());
		addBeanToRequest(req, "aswebdataPagexScriptsElementForm", form);

		ScriptsQuickAddFB quickAddForm = new ScriptsQuickAddFB() ;
		quickAddForm.setOwnerId(pagex.getId());
		addBeanToRequest(req, "aswebdataPagexScriptsQuickAddForm", quickAddForm);


		//link script to ASSiteData.Script
		List