AbstractBaseExpressionImpl.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.generic_project.expression.impl;

  21. import java.util.List;

  22. import org.openspcoop2.generic_project.beans.IField;
  23. import org.openspcoop2.generic_project.beans.IModel;
  24. import org.openspcoop2.generic_project.exception.ExpressionException;
  25. import org.openspcoop2.generic_project.exception.ExpressionNotImplementedException;
  26. import org.openspcoop2.generic_project.expression.impl.formatter.IObjectFormatter;

  27. /**
  28.  * AbstractBaseExpressionImpl
  29.  *
  30.  * @author Poli Andrea (apoli@link.it)
  31.  * @author $Author$
  32.  * @version $Rev$, $Date$
  33.  */
  34. public abstract class AbstractBaseExpressionImpl {

  35.     private IObjectFormatter objectFormatter;
  36.    
  37.     protected AbstractBaseExpressionImpl(IObjectFormatter objectFormatter){
  38.         this.objectFormatter = objectFormatter;
  39.     }
  40.    
  41.     private boolean not = false;

  42.     public boolean isNot() {
  43.         return this.not;
  44.     }

  45.     public void setNot(boolean not) {
  46.         this.not = not;
  47.     }

  48.     public IObjectFormatter getObjectFormatter() {
  49.         return this.objectFormatter;
  50.     }

  51.     public void setObjectFormatter(IObjectFormatter objectFormatter) {
  52.         this.objectFormatter = objectFormatter;
  53.     }

  54.     public abstract boolean inUseField(IField field) throws ExpressionNotImplementedException, ExpressionException;
  55.    
  56.     public abstract List<Object> getFieldValues(IField field) throws ExpressionNotImplementedException, ExpressionException;
  57.        
  58.     public abstract boolean inUseModel(IModel<?> model) throws ExpressionNotImplementedException, ExpressionException;
  59.    
  60.    
  61.     public abstract List<IField> getFields() throws ExpressionNotImplementedException, ExpressionException;

  62. }