com.helger.ebinterface.builder.EbInterfaceValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ph-ebinterface Show documentation
Show all versions of ph-ebinterface Show documentation
ebInterface wrapper library to easily read and write ebInterface documents
/**
* Copyright (C) 2014-2020 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.ebinterface.builder;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.NotThreadSafe;
import com.helger.ebinterface.v30.Ebi30InvoiceType;
import com.helger.ebinterface.v302.Ebi302InvoiceType;
import com.helger.ebinterface.v40.Ebi40InvoiceType;
import com.helger.ebinterface.v41.Ebi41InvoiceType;
import com.helger.ebinterface.v42.Ebi42InvoiceType;
import com.helger.ebinterface.v43.Ebi43InvoiceType;
import com.helger.ebinterface.v50.Ebi50InvoiceType;
import com.helger.ebinterface.v60.Ebi60InvoiceType;
import com.helger.jaxb.builder.JAXBValidationBuilder;
/**
* A writer builder for ebInterface documents.
*
* @author Philip Helger
* @param
* The ebInterface implementation class to be validated
*/
@NotThreadSafe
public class EbInterfaceValidator extends JAXBValidationBuilder >
{
public EbInterfaceValidator (@Nonnull final EEbInterfaceDocumentType eDocType)
{
super (eDocType);
}
public EbInterfaceValidator (@Nonnull final Class aClass)
{
this (EbInterfaceDocumentTypes.getDocumentTypeOfImplementationClass (aClass));
}
/**
* Create a new validation builder.
*
* @param aClass
* The UBL class to be validated. May not be null
.
* @return The new validation builder. Never null
.
* @param
* The ebInterface document implementation type
*/
@Nonnull
public static EbInterfaceValidator create (@Nonnull final Class aClass)
{
return new EbInterfaceValidator <> (aClass);
}
/**
* Create a validation builder for Ebi30InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface30 ()
{
return EbInterfaceValidator.create (Ebi30InvoiceType.class);
}
/**
* Create a validation builder for Ebi302InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface302 ()
{
return EbInterfaceValidator.create (Ebi302InvoiceType.class);
}
/**
* Create a validation builder for Ebi40InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface40 ()
{
return EbInterfaceValidator.create (Ebi40InvoiceType.class);
}
/**
* Create a validation builder for Ebi41InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface41 ()
{
return EbInterfaceValidator.create (Ebi41InvoiceType.class);
}
/**
* Create a validation builder for Ebi42InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface42 ()
{
return EbInterfaceValidator.create (Ebi42InvoiceType.class);
}
/**
* Create a validation builder for Ebi43InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface43 ()
{
return EbInterfaceValidator.create (Ebi43InvoiceType.class);
}
/**
* Create a validation builder for Ebi50InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface50 ()
{
return EbInterfaceValidator.create (Ebi50InvoiceType.class);
}
/**
* Create a validation builder for Ebi60InvoiceType.
*
* @return The builder and never null
*/
@Nonnull
public static EbInterfaceValidator ebInterface60 ()
{
return EbInterfaceValidator.create (Ebi60InvoiceType.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy