Search in sources :

Example 6 with SMPTransportProfile

use of com.helger.peppol.smp.SMPTransportProfile in project phoss-smp by phax.

the class SMPTransportProfileManagerXML method deleteSMPTransportProfile.

@Nonnull
public EChange deleteSMPTransportProfile(@Nullable final String sSMPTransportProfileID) {
    if (StringHelper.hasNoText(sSMPTransportProfileID))
        return EChange.UNCHANGED;
    m_aRWLock.writeLock().lock();
    try {
        final SMPTransportProfile aSMPTransportProfile = internalDeleteItem(sSMPTransportProfileID);
        if (aSMPTransportProfile == null) {
            AuditHelper.onAuditDeleteFailure(SMPTransportProfile.OT, sSMPTransportProfileID, "no-such-id");
            return EChange.UNCHANGED;
        }
    } finally {
        m_aRWLock.writeLock().unlock();
    }
    AuditHelper.onAuditDeleteSuccess(SMPTransportProfile.OT, sSMPTransportProfileID);
    return EChange.CHANGED;
}
Also used : ISMPTransportProfile(com.helger.peppol.smp.ISMPTransportProfile) SMPTransportProfile(com.helger.peppol.smp.SMPTransportProfile) ESMPTransportProfile(com.helger.peppol.smp.ESMPTransportProfile) Nonnull(javax.annotation.Nonnull)

Aggregations

ISMPTransportProfile (com.helger.peppol.smp.ISMPTransportProfile)6 SMPTransportProfile (com.helger.peppol.smp.SMPTransportProfile)6 Nullable (javax.annotation.Nullable)4 ESMPTransportProfile (com.helger.peppol.smp.ESMPTransportProfile)3 ConstantPreparedStatementDataProvider (com.helger.db.jdbc.callback.ConstantPreparedStatementDataProvider)2 Nonnull (javax.annotation.Nonnull)2 EChange (com.helger.commons.state.EChange)1 ESuccess (com.helger.commons.state.ESuccess)1 Wrapper (com.helger.commons.wrapper.Wrapper)1 DBExecutor (com.helger.db.jdbc.executor.DBExecutor)1 DBResultRow (com.helger.db.jdbc.executor.DBResultRow)1