AccordiServizioParteComuneResourcesRepresentationChange.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.web.ctrlstat.servlet.apc;

  21. import java.util.ArrayList;
  22. import java.util.List;

  23. import javax.servlet.http.HttpServletRequest;
  24. import javax.servlet.http.HttpServletResponse;
  25. import javax.servlet.http.HttpSession;

  26. import org.apache.commons.lang.StringUtils;
  27. import org.apache.struts.action.Action;
  28. import org.apache.struts.action.ActionForm;
  29. import org.apache.struts.action.ActionForward;
  30. import org.apache.struts.action.ActionMapping;
  31. import org.openspcoop2.core.registry.AccordoServizioParteComune;
  32. import org.openspcoop2.core.registry.IdSoggetto;
  33. import org.openspcoop2.core.registry.Resource;
  34. import org.openspcoop2.core.registry.ResourceRepresentation;
  35. import org.openspcoop2.core.registry.ResourceRepresentationJson;
  36. import org.openspcoop2.core.registry.ResourceRepresentationXml;
  37. import org.openspcoop2.core.registry.ResourceRequest;
  38. import org.openspcoop2.core.registry.ResourceResponse;
  39. import org.openspcoop2.core.registry.constants.RepresentationType;
  40. import org.openspcoop2.core.registry.constants.RepresentationXmlType;
  41. import org.openspcoop2.core.registry.constants.StatiAccordo;
  42. import org.openspcoop2.core.registry.driver.IDAccordoFactory;
  43. import org.openspcoop2.message.constants.MessageType;
  44. import org.openspcoop2.message.constants.ServiceBinding;
  45. import org.openspcoop2.protocol.engine.ProtocolFactoryManager;
  46. import org.openspcoop2.protocol.engine.utils.NamingUtils;
  47. import org.openspcoop2.protocol.sdk.IProtocolFactory;
  48. import org.openspcoop2.utils.rest.api.ApiResponse;
  49. import org.openspcoop2.web.ctrlstat.core.ControlStationCore;
  50. import org.openspcoop2.web.ctrlstat.core.ConsoleSearch;
  51. import org.openspcoop2.web.ctrlstat.servlet.GeneralHelper;
  52. import org.openspcoop2.web.ctrlstat.servlet.apc.api.ApiCostanti;
  53. import org.openspcoop2.web.ctrlstat.servlet.soggetti.SoggettiCore;
  54. import org.openspcoop2.web.lib.mvc.Costanti;
  55. import org.openspcoop2.web.lib.mvc.DataElement;
  56. import org.openspcoop2.web.lib.mvc.ForwardParams;
  57. import org.openspcoop2.web.lib.mvc.GeneralData;
  58. import org.openspcoop2.web.lib.mvc.PageData;
  59. import org.openspcoop2.web.lib.mvc.Parameter;
  60. import org.openspcoop2.web.lib.mvc.ServletUtils;
  61. import org.openspcoop2.web.lib.mvc.TipoOperazione;

  62. /**
  63.  * AccordiServizioParteComuneResourcesRepresentationChange
  64.  *
  65.  * @author Andrea Poli (apoli@link.it)
  66.  * @author $Author$
  67.  * @version $Rev$, $Date$
  68.  *
  69.  */
  70. public final class AccordiServizioParteComuneResourcesRepresentationChange extends Action {

  71.     @Override
  72.     public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {

  73.         HttpSession session = request.getSession(true);

  74.         // Inizializzo PageData
  75.         PageData pd = new PageData();

  76.         // Inizializzo GeneralData
  77.         GeneralHelper generalHelper = new GeneralHelper(session);

  78.         GeneralData gd = generalHelper.initGeneralData(request);

  79.         String userLogin = ServletUtils.getUserLoginFromSession(session);

  80.         IDAccordoFactory idAccordoFactory = IDAccordoFactory.getInstance();

  81.         // Parametri relativi al tipo operazione
  82.         TipoOperazione tipoOp = TipoOperazione.CHANGE;

  83.         try {
  84.             AccordiServizioParteComuneCore apcCore = new AccordiServizioParteComuneCore();

  85.             SoggettiCore soggettiCore = new SoggettiCore(apcCore);
  86.             AccordiServizioParteComuneHelper apcHelper = new AccordiServizioParteComuneHelper(request, pd, session);

  87.             String editMode = apcHelper.getParameter(Costanti.DATA_ELEMENT_EDIT_MODE_NAME);
  88.             String id = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_ID);
  89.             long idAccordoLong = Long.parseLong(id);
  90.             String nomeRisorsa = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_NOME);
  91.             if (nomeRisorsa == null) {
  92.                 nomeRisorsa = "";
  93.             }
  94.             String statusS = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_RESPONSE_STATUS);
  95.             Integer status = null;
  96.             try {
  97.                 if(statusS!=null)
  98.                     status = Integer.parseInt(statusS);
  99.             } catch(Exception e) {
  100.                 // ignore
  101.             }
  102.             String isReq = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCE_REQUEST);
  103.             boolean isRequest = ServletUtils.isCheckBoxEnabled(isReq);
  104.            
  105.             String descr = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_DESCRIZIONE);
  106.             if (descr == null) {
  107.                 descr = "";
  108.             }
  109.            
  110.             String idRep = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_ID);
  111.             int idRepInt = Integer.parseInt(idRep);

  112.             String messageProcessorS = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_MESSAGE_TYPE);
  113.             MessageType messageType = (StringUtils.isNotEmpty(messageProcessorS) && !messageProcessorS.equals(AccordiServizioParteComuneCostanti.DEFAULT_VALUE_PARAMETRO_APC_MESSAGE_TYPE_DEFAULT)) ? MessageType.valueOf(messageProcessorS) : null;
  114.             String mediaType = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_MEDIA_TYPE);
  115.             String tipoS = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_TIPO);
  116.             RepresentationType tipo = (StringUtils.isNotEmpty(tipoS) && !messageProcessorS.equals(AccordiServizioParteComuneCostanti.DEFAULT_VALUE_PARAMETRO_APC_RESOURCES_REPRESENTATION_TIPO_NON_DEFINITO)) ? RepresentationType.toEnumConstant(tipoS) : null;
  117.             String nome = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_NOME);
  118.             String tipoJson = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_JSON_TYPE);
  119.             String namespaceXml = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_XML_NAMESPACE);
  120.             String nomeXml = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_XML_NAME);
  121.             String xmlTypeS = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_REPRESENTATION_XML_TIPO);
  122.             RepresentationXmlType xmlType =  StringUtils.isNotEmpty(xmlTypeS) ? RepresentationXmlType.toEnumConstant(xmlTypeS) : null;
  123.             String tipoAccordo = apcHelper.getParameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_TIPO_ACCORDO);
  124.             if("".equals(tipoAccordo))
  125.                 tipoAccordo = null;

  126.             // Preparo il menu
  127.             apcHelper.makeMenu();

  128.             // Prendo il nome
  129.             AccordoServizioParteComune as = apcCore.getAccordoServizioFull(idAccordoLong);
  130.             String uriAS = idAccordoFactory.getUriFromAccordo(as);
  131.             String labelASTitle = apcHelper.getLabelIdAccordo(as);

  132.             String protocollo = null;
  133.             //calcolo del protocollo implementato dall'accordo
  134.             IdSoggetto soggettoReferente = as.getSoggettoReferente();
  135.             String tipoSoggettoReferente = soggettoReferente.getTipo();
  136.             protocollo = soggettiCore.getProtocolloAssociatoTipoSoggetto(tipoSoggettoReferente);
  137.            
  138.             ServiceBinding serviceBinding;
  139.             //calcolo del serviceBinding dall'accordo
  140.             serviceBinding = apcCore.toMessageServiceBinding(as.getServiceBinding());
  141.            
  142.             IProtocolFactory<?> protocolFactory = ProtocolFactoryManager.getInstance().getProtocolFactoryByName(protocollo);

  143.             Resource risorsa = null;
  144.             for (int j = 0; j < as.sizeResourceList(); j++) {
  145.                 risorsa = as.getResource(j);
  146.                 if (nomeRisorsa.equals(risorsa.getNome())) {
  147.                     break;
  148.                 }
  149.             }
  150.            
  151.             if(risorsa==null) {
  152.                 throw new Exception("Risorsa con nome '"+nomeRisorsa+"' non trovata nell'accordo con id '"+idAccordoLong+"'");
  153.             }
  154.            
  155.             Long idResponse = null;
  156.             Long idResource = null;
  157.             ResourceRequest resourceRequest = null;
  158.             ResourceResponse resourceResponse = null;
  159.             ResourceRepresentation resourceRepresentationOLD = null;
  160.             List<ResourceRepresentation> representationList = null;
  161.             if(isRequest) {
  162.                 resourceRequest = risorsa.getRequest();
  163.                 idResource = risorsa.getId();
  164.                 if(resourceRequest != null)
  165.                     representationList = resourceRequest.getRepresentationList();
  166.             } else {
  167.                 if(risorsa.getResponseList() != null) {
  168.                     for (int i = 0; i < risorsa.getResponseList().size(); i++) {
  169.                         resourceResponse = risorsa.getResponse(i);
  170.                         if (resourceResponse.getStatus() == status) {
  171.                             idResponse = resourceResponse.getId();
  172.                             break;
  173.                         }
  174.                     }
  175.                     if(resourceResponse != null)
  176.                         representationList = resourceResponse.getRepresentationList();
  177.                 }
  178.             }
  179.            
  180.             String oldMediaType = null;
  181.             if(representationList != null && !representationList.isEmpty()) {
  182.                 for (ResourceRepresentation resourceRepresentation : representationList) {
  183.                     if(resourceRepresentation.getId().intValue() == idRepInt) {
  184.                         resourceRepresentationOLD = resourceRepresentation;
  185.                         break;
  186.                     }
  187.                 }
  188.             }
  189.            
  190.             if(resourceRepresentationOLD!=null) {
  191.                 oldMediaType = resourceRepresentationOLD.getMediaType();
  192.             }
  193.            
  194.             Parameter pTipoAccordo = AccordiServizioParteComuneUtilities.getParametroAccordoServizio(tipoAccordo);
  195.             Parameter pIdAccordo = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_ID, id);
  196.             Parameter pNomeAccordo = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_NOME, uriAS);
  197.             Parameter pNomeRisorsa = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_NOME, risorsa.getNome());
  198.             Parameter pIsRequest = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCE_REQUEST, isRequest+"");
  199.             Parameter pIdRisorsa = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_ID, risorsa.getId()+"");
  200.             Parameter pResponseStatus = new Parameter(AccordiServizioParteComuneCostanti.PARAMETRO_APC_RESOURCES_RESPONSE_STATUS, statusS);
  201.             Boolean isModalitaVistaApiCustom = ServletUtils.getBooleanAttributeFromSession(ApiCostanti.SESSION_ATTRIBUTE_VISTA_APC_API, session, request, false).getValue();
  202.             List<Parameter> listaParams = apcHelper.getTitoloApc(TipoOperazione.CHANGE, as, tipoAccordo, labelASTitle, null, false);
  203.            
  204.             String labelRisorse = (isModalitaVistaApiCustom!=null && isModalitaVistaApiCustom.booleanValue()) ? AccordiServizioParteComuneCostanti.LABEL_RISORSE : AccordiServizioParteComuneCostanti.LABEL_RISORSE + " di " + labelASTitle;
  205.            
  206.             listaParams.add(new Parameter(labelRisorse, AccordiServizioParteComuneCostanti.SERVLET_NAME_APC_RESOURCES_LIST, pIdAccordo, pNomeAccordo, pTipoAccordo));
  207.            
  208.             String labelRisorsa = NamingUtils.getLabelResource(risorsa);
  209.             listaParams.add(new Parameter(labelRisorsa, AccordiServizioParteComuneCostanti.SERVLET_NAME_APC_RESOURCES_CHANGE, pIdAccordo, pNomeAccordo, pTipoAccordo,pIdRisorsa));
  210.            
  211.             if(!isRequest) {
  212.                 String labelResponse = AccordiServizioParteComuneCostanti.LABEL_RISPOSTE;
  213.                 listaParams.add(new Parameter(labelResponse, AccordiServizioParteComuneCostanti.SERVLET_NAME_APC_RESOURCES_RISPOSTE_LIST, pIdAccordo, pNomeAccordo, pTipoAccordo,pNomeRisorsa));
  214.                
  215.                 String labelRisposta = AccordiServizioParteComuneCostanti.LABEL_PARAMETRO_APC_RESOURCES_RESPONSE_STATUS +" "+
  216.                         (ApiResponse.isDefaultHttpReturnCode(status)? AccordiServizioParteComuneCostanti.LABEL_PARAMETRO_APC_RESOURCES_RESPONSE_STATUS_DEFAULT : statusS);
  217.                
  218.                 listaParams.add(new Parameter(labelRisposta, AccordiServizioParteComuneCostanti.SERVLET_NAME_APC_RESOURCES_RISPOSTE_CHANGE, pIdAccordo, pTipoAccordo, pNomeAccordo, pNomeRisorsa,pResponseStatus));
  219.             }
  220.            
  221.             String labelRepresentation = AccordiServizioParteComuneCostanti.LABEL_REPRESENTATION;
  222.            
  223.             listaParams.add(new Parameter(labelRepresentation, AccordiServizioParteComuneCostanti.SERVLET_NAME_APC_RESOURCES_REPRESENTATIONS_LIST, pIdAccordo, pNomeAccordo, pTipoAccordo,pNomeRisorsa,pIsRequest, pResponseStatus));
  224.             listaParams.add(new Parameter(oldMediaType, null));

  225.             // Se idhid = null, devo visualizzare la pagina per la
  226.             // modifica dati
  227.             if(ServletUtils.isEditModeInProgress(editMode)){

  228.                 // setto la barra del titolo
  229.                 ServletUtils.setPageDataTitle(pd,listaParams);

  230.                 // Prendo i dati dell'accordo
  231.                 if(mediaType == null){
  232.                     mediaType = resourceRepresentationOLD.getMediaType();
  233.                     descr = resourceRepresentationOLD.getDescrizione();
  234.                     nome = resourceRepresentationOLD.getNome();
  235.                     messageType = apcCore.toMessageMessageType(resourceRepresentationOLD.getMessageType());
  236.                     tipo = resourceRepresentationOLD.getRepresentationType();
  237.                     if(tipo != null) {
  238.                         switch (tipo) {
  239.                         case JSON:
  240.                             ResourceRepresentationJson json = resourceRepresentationOLD.getJson();
  241.                             tipoJson = json.getTipo();
  242.                             break;
  243.                         case XML:
  244.                         default:
  245.                             ResourceRepresentationXml xml = resourceRepresentationOLD.getXml();
  246.                             namespaceXml = xml.getNamespace();
  247.                             nomeXml = xml.getNome();
  248.                             xmlType = xml.getXmlType();
  249.                             break;
  250.                         }
  251.                     }
  252.                 }
  253.                
  254.                 // preparo i campi
  255.                 List<DataElement> dati = new ArrayList<>();

  256.                 dati.add(ServletUtils.getDataElementForEditModeFinished());

  257.                 dati = apcHelper.addAccordiResourceRepresentationToDati(tipoOp, dati, id, as.getStatoPackage(),tipoAccordo,protocollo,
  258.                         protocolFactory,serviceBinding, nomeRisorsa, isRequest, statusS, idRepInt, mediaType, nome, descr, messageType, tipo, tipoJson, nomeXml, namespaceXml, xmlType);
  259.                 pd.setDati(dati);

  260.                 if( apcHelper.isModalitaStandard() || (apcHelper.isShowGestioneWorkflowStatoDocumenti() && StatiAccordo.finale.toString().equals(as.getStatoPackage()))){
  261.                     pd.disableEditMode();
  262.                 }

  263.                 ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);

  264.                 return ServletUtils.getStrutsForwardEditModeInProgress(mapping, AccordiServizioParteComuneCostanti.OBJECT_NAME_APC_RESOURCES_REPRESENTATIONS, ForwardParams.CHANGE());

  265.             }
  266.            
  267.             // Controlli sui campi immessi
  268.             boolean isOk = apcHelper.accordiResourceRepresentationCheckData(tipoOp, id, nomeRisorsa, isRequest, statusS, mediaType, nome, descr, messageType, tipo, tipoJson, nomeXml, namespaceXml, xmlType, idResource,idResponse, oldMediaType);

  269.             if (!isOk) {

  270.                 // setto la barra del titolo
  271.                 ServletUtils.setPageDataTitle(pd,listaParams);

  272.                 // preparo i campi
  273.                 List<DataElement> dati = new ArrayList<>();
  274.                
  275.                 dati.add(ServletUtils.getDataElementForEditModeFinished());

  276.                 dati = apcHelper.addAccordiResourceRepresentationToDati(tipoOp, dati, id, as.getStatoPackage(),tipoAccordo,protocollo,
  277.                         protocolFactory,serviceBinding, nomeRisorsa, isRequest, statusS, idRepInt, mediaType, nome, descr, messageType, tipo, tipoJson, nomeXml, namespaceXml, xmlType);
  278.                 pd.setDati(dati);

  279.                 ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);

  280.                 return ServletUtils.getStrutsForwardEditModeCheckError(mapping, AccordiServizioParteComuneCostanti.OBJECT_NAME_APC_RESOURCES_REPRESENTATIONS, ForwardParams.CHANGE());
  281.             }
  282.            
  283.             // Inserisco la risorsa nel db
  284.             ResourceRepresentation newRepresentation = new ResourceRepresentation();
  285.             newRepresentation.setMessageType(apcCore.fromMessageMessageType(messageType));
  286.             newRepresentation.setDescrizione(descr);

  287.             newRepresentation.setNome(nome);
  288.             newRepresentation.setMediaType(mediaType);
  289.             newRepresentation.setRepresentationType(tipo);
  290.            
  291.             if(tipo != null) {
  292.                 switch (tipo) {
  293.                 case JSON:
  294.                     ResourceRepresentationJson json = new ResourceRepresentationJson();
  295.                     json.setTipo(tipoJson);
  296.                     newRepresentation.setJson(json);
  297.                     break;
  298.                 case XML:
  299.                     ResourceRepresentationXml xml = new ResourceRepresentationXml();
  300.                     xml.setXmlType(xmlType);
  301.                     xml.setNome(nomeXml);
  302.                     xml.setNamespace(namespaceXml);
  303.                     newRepresentation.setXml(xml);
  304.                     break;
  305.                 default:
  306.                     break;
  307.                 }
  308.             }
  309.             int idx = -1;          
  310.             if(representationList != null && !representationList.isEmpty()) {
  311.                 for (int i = 0; i < representationList.size(); i++) {
  312.                     ResourceRepresentation resourceRepresentation = representationList.get(i);
  313.                     if(resourceRepresentation.getId().intValue() == idRepInt) {
  314.                         idx = i;
  315.                         break;
  316.                     }
  317.                 }
  318.                 if(idx > -1) {
  319.                     representationList.remove(idx);
  320.                     representationList.add(idx, newRepresentation);
  321.                 }
  322.             }

  323.             // effettuo le operazioni
  324.             apcCore.performUpdateOperation(userLogin, apcHelper.smista(), as);
  325.            
  326.             // Devo rileggere l'accordo dal db, perche' altrimenti
  327.             // manca l'id dei nuovi port-type
  328.             as = apcCore.getAccordoServizioFull(idAccordoLong);

  329.             // Preparo la lista
  330.             ConsoleSearch ricerca = (ConsoleSearch) ServletUtils.getSearchObjectFromSession(request, session, ConsoleSearch.class);

  331.             risorsa = null;
  332.             for (int j = 0; j < as.sizeResourceList(); j++) {
  333.                 risorsa = as.getResource(j);
  334.                 if (nomeRisorsa.equals(risorsa.getNome())) {
  335.                     break;
  336.                 }
  337.             }
  338.            
  339.             if(risorsa==null) {
  340.                 throw new Exception("Risorsa con nome '"+nomeRisorsa+"' non trovata nell'accordo con id '"+idAccordoLong+"'");
  341.             }
  342.            
  343.             idResponse = null;
  344.             idResource = null;
  345.             resourceRequest = null;
  346.             resourceResponse = null;
  347.             if(isRequest) {
  348.                 resourceRequest = risorsa.getRequest();
  349.                 idResource = risorsa.getId();
  350.             } else {
  351.                 if(risorsa.getResponseList() != null) {
  352.                     for (int i = 0; i < risorsa.getResponseList().size(); i++) {
  353.                         resourceResponse = risorsa.getResponse(i);
  354.                         if (resourceResponse.getStatus() == status) {
  355.                             idResponse = resourceResponse.getId();
  356.                             break;
  357.                         }
  358.                     }
  359.                 }
  360.             }

  361.             List<ResourceRepresentation> lista = apcCore.accordiResourceRepresentationsList(idResource, isRequest, idResponse, ricerca);

  362.             apcHelper.prepareAccordiResourcesRepresentationsList(id, as, lista, ricerca, tipoAccordo, isRequest, risorsa, resourceRequest, resourceResponse);


  363.             ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);

  364.             return ServletUtils.getStrutsForwardEditModeFinished(mapping, AccordiServizioParteComuneCostanti.OBJECT_NAME_APC_RESOURCES_REPRESENTATIONS, ForwardParams.CHANGE());

  365.         } catch (Exception e) {
  366.             return ServletUtils.getStrutsForwardError(ControlStationCore.getLog(), e, pd, request, session, gd, mapping,
  367.                     AccordiServizioParteComuneCostanti.OBJECT_NAME_APC_RESOURCES_REPRESENTATIONS, ForwardParams.CHANGE());
  368.         }
  369.     }
  370. }