// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/format/SignatureCAdESFormat.java
// public class SignatureCAdESFormat extends SignatureFormat {
//     public SignatureCAdESFormat(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/format/SignatureFormat.java
// public class SignatureFormat extends GeneralEnum {
//     public static final String XAdES_NAME = "XAdES";
//     public static final String CAdES_NAME = "CAdES";
//     public static final String PAdES_NAME = "PAdES";
// 
//     public static final SignatureFormat XAdES = new SignatureXAdESFormat(XAdES_NAME);
//     public static final SignatureFormat CAdES = new SignatureCAdESFormat(CAdES_NAME);
//     public static final SignatureFormat PAdES = new SignaturePAdESFormat(PAdES_NAME);
// 
//     public SignatureFormat(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/level/SignatureCAdESLevel.java
// public class SignatureCAdESLevel extends SignatureLevel {
//     public static SignatureCAdESLevel BES = new SignatureCAdESLevel(SignatureLevel.BES);
//     public static SignatureCAdESLevel EPES = new SignatureCAdESLevel(SignatureLevel.EPES);
//     public static SignatureCAdESLevel T = new SignatureCAdESLevel(SignatureLevel.T);
//     public static SignatureCAdESLevel C = new SignatureCAdESLevel(SignatureLevel.C);
//     public static SignatureCAdESLevel X = new SignatureCAdESLevel(SignatureLevel.X);
//     public static SignatureCAdESLevel XL = new SignatureCAdESLevel(SignatureLevel.XL);
//     public static SignatureCAdESLevel A = new SignatureCAdESLevel(SignatureLevel.A);
// 
//     public SignatureCAdESLevel(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/packaging/SignatureCAdESPackaging.java
// public class SignatureCAdESPackaging extends SignaturePackaging {
//     public static SignatureCAdESPackaging ENVELOPING = new SignatureCAdESPackaging(SignaturePackaging.ENVELOPING);
//     public static SignatureCAdESPackaging DETACHED = new SignatureCAdESPackaging(SignaturePackaging.DETACHED);
// 
//     public SignatureCAdESPackaging(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/exception/SignatureServiceUrlException.java
// public class SignatureServiceUrlException extends SignatureException {
//     public SignatureServiceUrlException() {
//     }
//     public SignatureServiceUrlException(Exception e) {
//         super(e);
//     }
// 
//     @Override
//     public String getMessage() {
//         return "The service URL was required but not specified!";
//     }
// }


import it.latraccia.dss.util.entity.format.SignatureCAdESFormat;
import it.latraccia.dss.util.entity.format.SignatureFormat;
import it.latraccia.dss.util.entity.level.SignatureCAdESLevel;
import it.latraccia.dss.util.entity.packaging.SignatureCAdESPackaging;
import it.latraccia.dss.util.exception.SignatureServiceUrlException;
/*
 * SD-DSS-Util, a Utility Library and a Command Line Interface for SD-DSS.
 * Copyright (C) 2013 La Traccia http://www.latraccia.it/en/
 * Developed by Francesco Pontillo
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package it.latraccia.dss.util.builder.format;


/**
 * Date: 06/12/13
 * Time: 11.10
 *
 * @author Francesco Pontillo
 */
public class CAdESFormatBuilder extends FormatBuilder<SignatureCAdESFormat> {

    // FORMAT

    public CAdESFormatBuilder() {
        setFormat(SignatureFormat.CAdES);
    }

    // LEVEL

    public CAdESFormatBuilder BES() {
        setLevel(SignatureCAdESLevel.BES);
        return this;
    }

    public CAdESFormatBuilder EPES() {
        setLevel(SignatureCAdESLevel.EPES);
        return this;
    }

    public CAdESFormatBuilder T(String serviceUrl) throws SignatureServiceUrlException {
        setLevel(SignatureCAdESLevel.T);
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/format/SignatureCAdESFormat.java
// public class SignatureCAdESFormat extends SignatureFormat {
//     public SignatureCAdESFormat(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/format/SignatureFormat.java
// public class SignatureFormat extends GeneralEnum {
//     public static final String XAdES_NAME = "XAdES";
//     public static final String CAdES_NAME = "CAdES";
//     public static final String PAdES_NAME = "PAdES";
// 
//     public static final SignatureFormat XAdES = new SignatureXAdESFormat(XAdES_NAME);
//     public static final SignatureFormat CAdES = new SignatureCAdESFormat(CAdES_NAME);
//     public static final SignatureFormat PAdES = new SignaturePAdESFormat(PAdES_NAME);
// 
//     public SignatureFormat(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/level/SignatureCAdESLevel.java
// public class SignatureCAdESLevel extends SignatureLevel {
//     public static SignatureCAdESLevel BES = new SignatureCAdESLevel(SignatureLevel.BES);
//     public static SignatureCAdESLevel EPES = new SignatureCAdESLevel(SignatureLevel.EPES);
//     public static SignatureCAdESLevel T = new SignatureCAdESLevel(SignatureLevel.T);
//     public static SignatureCAdESLevel C = new SignatureCAdESLevel(SignatureLevel.C);
//     public static SignatureCAdESLevel X = new SignatureCAdESLevel(SignatureLevel.X);
//     public static SignatureCAdESLevel XL = new SignatureCAdESLevel(SignatureLevel.XL);
//     public static SignatureCAdESLevel A = new SignatureCAdESLevel(SignatureLevel.A);
// 
//     public SignatureCAdESLevel(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/entity/packaging/SignatureCAdESPackaging.java
// public class SignatureCAdESPackaging extends SignaturePackaging {
//     public static SignatureCAdESPackaging ENVELOPING = new SignatureCAdESPackaging(SignaturePackaging.ENVELOPING);
//     public static SignatureCAdESPackaging DETACHED = new SignatureCAdESPackaging(SignaturePackaging.DETACHED);
// 
//     public SignatureCAdESPackaging(String value) {
//         super(value);
//     }
// }
// 
// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/exception/SignatureServiceUrlException.java
// public class SignatureServiceUrlException extends SignatureException {
//     public SignatureServiceUrlException() {
//     }
//     public SignatureServiceUrlException(Exception e) {
//         super(e);
//     }
// 
//     @Override
//     public String getMessage() {
//         return "The service URL was required but not specified!";
//     }
// }


// Path: sd-dss-util-lib/src/main/java/it/latraccia/dss/util/builder/format/CAdESFormatBuilder.java
import it.latraccia.dss.util.entity.format.SignatureCAdESFormat;
import it.latraccia.dss.util.entity.format.SignatureFormat;
import it.latraccia.dss.util.entity.level.SignatureCAdESLevel;
import it.latraccia.dss.util.entity.packaging.SignatureCAdESPackaging;
import it.latraccia.dss.util.exception.SignatureServiceUrlException;

/*
 * SD-DSS-Util, a Utility Library and a Command Line Interface for SD-DSS.
 * Copyright (C) 2013 La Traccia http://www.latraccia.it/en/
 * Developed by Francesco Pontillo
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see [http://www.gnu.org/licenses/].
 */

package it.latraccia.dss.util.builder.format;


/**
 * Date: 06/12/13
 * Time: 11.10
 *
 * @author Francesco Pontillo
 */
public class CAdESFormatBuilder extends FormatBuilder<SignatureCAdESFormat> {

    // FORMAT

    public CAdESFormatBuilder() {
        setFormat(SignatureFormat.CAdES);
    }

    // LEVEL

    public CAdESFormatBuilder BES() {
        setLevel(SignatureCAdESLevel.BES);
        return this;
    }

    public CAdESFormatBuilder EPES() {
        setLevel(SignatureCAdESLevel.EPES);
        return this;
    }

    public CAdESFormatBuilder T(String serviceUrl) throws SignatureServiceUrlException {
        setLevel(SignatureCAdESLevel.T);
        setServiceUrl(serviceUrl);