
net.anotheria.anosite.gen.asbrand.action.EditBrandAction Maven / Gradle / Ivy
/**
********************************************************************************
*** EditBrandAction.java ***
*** generated by AnoSiteGenerator (ASG), Version: 4.2.2 ***
*** Copyright (C) 2005 - 2025 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.asbrand.action;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import net.anotheria.maf.action.ActionCommand;
import net.anotheria.maf.action.ActionMapping;
import java.util.List;
import java.util.ArrayList;
import net.anotheria.anosite.gen.asbrand.bean.EditBrandFB;
import net.anotheria.anosite.gen.asbrand.data.Brand;
import net.anotheria.asg.data.LockableObject;
public class EditBrandAction extends ShowBrandsAction{
// Generated by: class net.anotheria.asg.generator.view.action.ModuleActionsGenerator.generateEditAction
// Generated by: class net.anotheria.asg.generator.view.action.ModuleActionsGenerator.generateEditActionMethod
public ActionCommand anoDocExecute(ActionMapping mapping, HttpServletRequest req, HttpServletResponse res) throws Exception{
String id = getStringParameter(req, PARAM_ID);
EditBrandFB form = new EditBrandFB() ;
Brand brand = getASBrandService().getBrand(id);
checkBrands(brand, req);
if(brand instanceof LockableObject && !((LockableObject)brand).isLocked() && isAutoLockingEnabled())
lockBrands(brand, req);
form.setId(brand.getId());
form.setName(brand.getName());
form.setDefaultBrand(brand.getDefaultBrand());
// urlsToMap is a table, storing size only
form.setUrlsToMap(brand.getUrlsToMapSize());
// localizations is a table, storing size only
form.setLocalizations(brand.getLocalizationsSize());
// mediaLinks is a table, storing size only
form.setMediaLinks(brand.getMediaLinksSize());
// attributes is a table, storing size only
form.setAttributes(brand.getAttributesSize());
form.setLocked(((LockableObject)brand).isLocked());
form.setLockerId(((LockableObject)brand).getLockerId());
form.setLockingTime(net.anotheria.util.NumberUtils.makeISO8601TimestampString(((LockableObject)brand).getLockingTime()) + " automatic unlock expected AT : " + net.anotheria.util.NumberUtils.makeISO8601TimestampString(((LockableObject)brand).getLockingTime() + getLockingTimeout()));
addBeanToRequest(req, "objectId" , brand.getId());
addBeanToRequest(req, "EditASBrandBrandForm" , form);
addBeanToRequest(req, "objectInfoString" , brand.getObjectInfo().toString());
addBeanToRequest(req, "apply.label.prefix", "Apply");
addBeanToRequest(req, "save.label.prefix", "Save");
addBeanToRequest(req, "transfer.label.prefix", "Transfer");
addBeanToRequest(req, "sortTextData.label.prefix", "Sort Text Data");
addFieldExplanations(req, brand);
return mapping.success();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy