Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Auszug
hiddentrue

CAMT-Nuclet – 4.7.2 CAMT: Businessobjekt-Fassaden: Das CAMT-Nuclet arbeitet mit Wrapper-Objekte anstelle der nur dem Zielnuclet bekannten BusinessObjects (siehe Abschnitt 4.7.1).

globe with meridians Sprache: Deutsch · English

open book 4.7.2 CAMT: Businessobjekt-Fassaden

Das CAMT-Nuclet arbeitet mit Wrapper-Objekte anstelle der nur dem Zielnuclet bekannten BusinessObjects (siehe Abschnitt 4.7.1).

Status
colourGrey
titleReferenz
Status
colourBlue
titleIntegratoren
Status
colourGreen
titleStand: Jul 2026
Status
colourGrey
titlegilt fuer Nuclos 4.2026.x

Panel
bgColor#F4F5F7

Auf dieser Seite

Inhalt
maxLevel2
minLevel2

...

Das CAMT-Nuclet arbeitet mit Wrapper-Objekte anstelle der nur dem Zielnuclet bekannten BusinessObjects (siehe Abschnitt 4.7.1). Daher muss bei der Integration des MT940-Nuclets dafür gesorgt werden, dass gewisse Datenbankzugriffe auf den tatsächlich genutzten Businessobjekte operieren können. D.h. die verwendeten Klassen und Attributnamen müssen bekannt sein. Die Bereitstellung erfolgt über businessobjektbezogene Fassaden.

...

Tabelle 4.7.2: Übersicht, Anpassungen in Fassaden-Klassen
 

4.7.2.1 CurrencyFacade

In der Klasse CurrencyFacade müssen die Methoden getWrappedClass() und getIso4217CodeAttribute() implementiert werden:

...

Codeblock
languagejava
titleorg.nuclet.mt940.facade.ConditionsOfPaymentFacade
firstline1
linenumberstrue
collapsetrue
package org.nuclet.camt.facade;


import java.util.List;

import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.exception.BusinessException; 

import org.nuclet.common.facade.AbstractFacade;
import org.nuclet.camt.facade.AbstractConditionsOfPaymentFacade;
import org.nuclet.camt.wrapper.AbstractConditionsOfPaymentWrapper;
import org.nuclet.camt.wrapper.ConditionsOfPaymentWrapper;

// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
// 
// import org.nuclet.businessobject.ConditionsOfPayment;


/**
 * Facade for Business Objects of type "ConditionsOfPayment"
 * 
 * 
 * @version 1.0
 * @date 10.02.2015
 * @nuclet org.nuclet.CAMT054
 * @nucletversion 1.0.0
 * @sincenucletversion 1.0.0
 * @since 10.02.2015
 * @author frank.lehmann@nuclos.de 
 * 
 */
public class ConditionsOfPaymentFacade<T extends BusinessObject> extends AbstractConditionsOfPaymentFacade<T> // @replace! AbstractConditionsOfPaymentFacade<ConditionsOfPayment>
{        
    private static final ConditionsOfPaymentFacade instance = new ConditionsOfPaymentFacade();        
    
    /**
     * Liefert die Singleton-Instanz dieser Klasse
     *
     */
    public static ConditionsOfPaymentFacade getInstance()
    {
        return instance;
    }     
    
    /**
     * Wrap the actual currency objects inside an <code>AbstractCurrencyWrapper</code>
     * 
     * @return the actual currency objects, wrapped inside an <code>AbstractCurrencyWrapper</code>
     *
     */
    public AbstractConditionsOfPaymentWrapper getConditionsOfPaymentWrapper(final BusinessObject boConditionsOfPayment)
    {
        // @replace! 
        //
        // return new ConditionsOfPaymentWrapper(boConditionsOfPayment);
        
        return new ConditionsOfPaymentWrapper(boConditionsOfPayment);
    }
    
    /**
     * Get the class of the actual payment condition objects, i.e. the class wrapped by <code>ConditionsOfPaymentWrapper</code>
     * 
     * @return the class of the actual payment condition objects, i.e. the class wrapped by <code>ConditionsOfPaymentWrapper</code>
     *
     */
    public Class<T> getWrappedClass() //@replace! public class<ConditionsOfPayment>
    {
        // @replace! 
        //
        // return ConditionsOfPayment.class;
        
        return null;
    }    
}

 

4.7.2.3 ReferenceFacade

In der Klasse ReferenceFacade müssen die Methode getWrappedClass() und getNuclosStateAttribute() implementiert werden:

...

Die Beschreibung zur Anpassung der beiden Methoden getSourceStates() und getDestinationStates() finden Sie im nächsten Abschnitt (4.7.3).

Hinweis

Bitte beachten Sie außerdem, dass das generische "<T>" in den Zeilen 48 und 139 entsprechend ersetzt werden muss.

Codeblock
languagejava
titleorg.nuclet.mt940.facade.ReferenceFacade
linenumberstrue
collapsetrue
package org.nuclet.camt.facade;


import java.util.ArrayList;
import java.util.List;

import org.nuclos.api.UID;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.Query;
import org.nuclos.api.businessobject.QueryOperation;
import org.nuclos.api.businessobject.SearchExpression;
import org.nuclos.api.businessobject.attribute.ForeignKeyAttribute;
import org.nuclos.api.businessobject.facade.Stateful;
import org.nuclos.api.context.JobContext;
import org.nuclos.api.context.RuleContext;
import org.nuclos.api.exception.BusinessException; 
import org.nuclos.api.provider.QueryProvider;
import org.nuclos.api.provider.BusinessObjectProvider;
import org.nuclos.api.statemodel.State;

import org.nuclet.common.facade.AbstractFacade;

import org.nuclet.camt.facade.AbstractReferenceFacade;
import org.nuclet.camt.statemodel.ReferenceStatemodel;
import org.nuclet.camt.wrapper.AbstractReferenceWrapper;
import org.nuclet.camt.wrapper.ReferenceWrapper;

// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
// 
// import org.nuclet.businesstemplate.ClientBilling;


/**
 * Facade for Business Objects of type "Reference"
 * 
 * 
 * @version 1.0
 * @date 10.02.2015
 * @nuclet org.nuclet.CAMT054
 * @nucletversion 1.0.0
 * @sincenucletversion 1.0.0
 * @since 10.02.2015
 * @author frank.lehmann@nuclos.de 
 * 
 */
public class ReferenceFacade<T extends BusinessObject & Stateful> extends AbstractReferenceFacade<T> // @replace AbstractReferenceFacade<ClientBilling>
{
    private static final ReferenceFacade instance = new ReferenceFacade();            
    
    
    /**
     * Liefert die Singleton-Instanz dieser Klasse
     *
     */
    public static ReferenceFacade getInstance()
    {
        return instance;
    } 
                
    
    /**
     * Liefert eine Liste von Quellzuständen zum gegebenen Statuswechsel.
     * 
     * @param stateChange Der Statuswechsel, repräsentiert durch ein Objekt vom Typ <code>StateChange</code>.
     * 
     * @return eine Liste von Quellzuständen zum gegebenen Statuswechsel
     * 
     */
    public List<State> getSourceStates(final ReferenceStatemodel.StateChange stateChange)
    {
        final List<State> lstSourceStates = new ArrayList<State>();
        
        switch (stateChange) {        
            case PaymentReceived:
                // @replace Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
                //
                // Beispiel:
                //
                // lstSourceStates.add(ProcessClientBillingSM.State_AB);
                // lstSourceStates.add(ProcessClientBillingSM.State_XY);
            
                break;
            default:
                break;
        }
        
        return lstSourceStates;
    }
    
    /**
     * Liefert den Zielzustand zum gegebenen Statuswechsel.
     * 
     * @param stateChange Der Statuswechsel, repräsentiert durch ein Objekt vom Typ <code>StateChange</code>.
     * 
     * @return der Zielzustand von Quellzuständen zum gegebenen Statuswechsel
     * 
     */
    public State getDestinationState(final ReferenceStatemodel.StateChange stateChange)
    {
        switch (stateChange) {        
            case PaymentReceived:
                // @replace Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
                //
                // Beispiel:
                //
                // return ProcessClientBillingSM.State_ZZ;
                //
                
                return null;                
            default:
                return null;
        }
        
    }
    
    /**
     * Wrap the actual reference objects inside an <code>AbstractReferenceWrapper</code>
     * 
     * @return the actual reference objects, wrapped inside an <code>AbstractReferenceWrapper</code>
     *
     */
    public AbstractReferenceWrapper getWrapper(final Stateful boReference)
    {
        // @replace! 
        //
        // return new ReferenceWrapper(boReference);
        
        return new ReferenceWrapper(boReference);
    }
    
    /**
     * Get the class of the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code>
     * 
     * @return the class of the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code>
     *
     */
    public Class<T> getWrappedClass() // @replace public Class<ClientBilling> getWrappedClass()
    {
        // @replace! 
        //
        // return ClientBilling.class;
        
        return null;
    }
    
    /**
     * Get the attribute <code>NuclosState</code> of the actual reference objects
     * 
     * @return the attribute <code>NuclosState</code> of the actual reference objects
     *
     */
    public ForeignKeyAttribute<UID> getNuclosStateAttribute()
    {
        // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
        //
        // Beispiel:
        //
        // return ClientBilling.NuclosState;
        
        return null;
    }
        
}

 

 

 

...

Verwandte Seiten

open book Nuclet: CAMT(sind im Handelsnuclet verfügbar)


CAMT-Datenblatt

Öffnen →

open book Schnittstellen


Alle Integrationen

Öffnen →