Versionen im Vergleich

Schlüssel

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

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

globe with meridians Sprache: Deutsch · English (in Aufbau)

open book 4.7.2 MT940: Businessobjekt-Fassaden

Das MT940-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 …

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 MT940-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.CurrencyFacade
linenumberstrue
collapsetrue
package org.nuclet.mt940.facade;


import java.util.List;

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.StringAttribute;
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.nuclet.common.facade.AbstractFacade;
import org.nuclet.mt940.facade.AbstractCurrencyFacade;
import org.nuclet.mt940.wrapper.AbstractCurrencyWrapper;
import org.nuclet.mt940.wrapper.CurrencyWrapper;

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


/**
 * Facade for Business Objects of type "Currency"
 * 
 * 
 * @version 1.1
 * @date 20.02.2014
 * @nuclet org.nuclet.MT940
 * @nucletversion 1.4.0
 * @sincenucletversion 1.1.0
 * @since 07.08.2013
 * @author frank.lehmann@nuclos.de 
 * 
 */
public class CurrencyFacade<T extends BusinessObject> extends AbstractCurrencyFacade<T> // @replace AbstractCurrencyFacade<Currency>
{        
    private static final CurrencyFacade instance = new CurrencyFacade();        
    
    /**
     * Liefert die Singleton-Instanz dieser Klasse
     *
     */
    public static CurrencyFacade 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 AbstractCurrencyWrapper getCurrencyWrapper(final BusinessObject boCurrency)
    {
		// @replace! 
        //
        // return new CurrencyWrapper(boCurrency);

		return new CurrencyWrapper(boCurrency);
    }
    
    /**
     * Get the class of the actual currency objects, i.e. the class wrapped by <code>CurrencyWrapper</code>
     * 
     * @return the class of the actual currency objects, i.e. the class wrapped by <code>CurrencyWrapper</code>
     *
     */
    public Class<T> getWrappedClass()  // @replace Class<Currency> getWrappedClass()
    {
        // @replace! 
        //
        // return Currency.class;
        
        return null;
    }
    
    /**
     * Get the attribute <code>NuclosState</code> of the actual currency objects
     * 
     * @return the attribute <code>NuclosState</code> of the actual reference objects
     *
     */
    public StringAttribute getIso4217CodeAttribute()
    {
        // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
        //
        // Beispiel:
        //
        // Currency.Iso4217Code;
        
        return null;
    }        
}

 

4.7.2.2 ConditionsOfPaymentFacade

...

Codeblock
languagejava
titleorg.nuclet.mt940.facade.ConditionsOfPaymentFacade
firstline1
linenumberstrue
collapsetrue
package org.nuclet.mt940.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.mt940.facade.AbstractConditionsOfPaymentFacade;
import org.nuclet.mt940.wrapper.AbstractConditionsOfPaymentWrapper;
import org.nuclet.mt940.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 07.07.2014
 * @nuclet org.nuclet.MT940
 * @nucletversion 1.4.1
 * @sincenucletversion 1.4.1
 * @since 07.07.2014
 * @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(boCurrency);
        
        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> getWrappedClass()
    {
        // @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.mt940.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.PrimaryKeyAttribute;
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.mt940.facade.AbstractReferenceFacade;
import org.nuclet.mt940.statemodel.ReferenceStatemodel;
import org.nuclet.mt940.wrapper.AbstractReferenceWrapper;
import org.nuclet.mt940.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.1
 * @date 20.02.2014
 * @nuclet org.nuclet.MT940
 * @nucletversion 1.4.0
 * @sincenucletversion 1.2.0
 * @since 20.09.2013
 * @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:
                //
                // lstSourceStateIds.add(ProcessClientBillingSM.State_AB);
                // lstSourceStateIds.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 getReferenceWrapper(final BusinessObject 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 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 PrimaryKeyAttribute<State> getNuclosStateAttribute()
    {
        // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
        //
        // Beispiel:
        //
        // ClientBilling.NuclosState;
        
        return null;
    }
        
}

 

 

...

Verwandte Seiten

open book Nuclet: MT940(noch nicht verfügbar)


MT940-Datenblatt

Öffnen →

open book Schnittstellen


Alle Integrationen

Öffnen →