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

org.beigesoft.ws.srv.FlSeSel Maven / Gradle / Ivy

Go to download

It consists of double entry accounting and trading (web-store) business logic. It's based on previous beigesoft-accounting and beigesoft-webstore projects.

The newest version!
/*
BSD 2-Clause License

Copyright (c) 2019, Beigesoft™
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.beigesoft.ws.srv;

import java.util.Set;
import java.util.Map;

import org.beigesoft.mdl.IHasId;
import org.beigesoft.mdl.IReqDt;
import org.beigesoft.dlg.IEvalFr;
import org.beigesoft.ws.mdlp.SeSel;

/**
 * 

S.E.Seller page filter.

* * @author Yury Demidenko */ public class FlSeSel implements IEvalFr { /** *

S.E.Seller service.

**/ private IFiSeSel fiSeSel; /** *

S.E. entities. Only list operation is allowed, no "modify".

**/ private Set>> ents; /** *

Evaluate SQL filter for current user.

* @param pRvs request scoped vars * @param pRqDt request data * @return filter for has S.E. or null for foreign shared, e.g. Uom * @throws Exception - an exception **/ @Override public final String eval(final Map pRvs, final IReqDt pRqDt) throws Exception { String nmEnt = pRqDt.getParam("ent"); boolean isSe = false; for (Class> cl : this.ents) { if (cl.getSimpleName().equals(nmEnt)) { isSe = true; break; } } if (isSe) { SeSel sel = this.fiSeSel.find(pRvs, pRqDt.getUsrNm()); return "SELR=" + sel.getDbcr().getIid(); } else { //picked foreign, e.g. Uom: return null; } } //SGS: /** *

Getter for fiSeSel.

* @return IFiSeSel **/ public final IFiSeSel getFiSeSel() { return this.fiSeSel; } /** *

Setter for fiSeSel.

* @param pFiSeSel reference **/ public final void setFiSeSel(final IFiSeSel pFiSeSel) { this.fiSeSel = pFiSeSel; } /** *

Getter for ents.

* @return Set>> **/ public final Set>> getEnts() { return this.ents; } /** *

Setter for ents.

* @param pEnts reference **/ public final void setEnts(final Set>> pEnts) { this.ents = pEnts; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy