@Command("98")
@TestCaseDefault("98NNNNNN00000019700101    0100002.00AO|BXNNNNNNNNNNNNNNNN|")
@TestCasePopulated("98YYYYYY12312319700101    0100001.00AFscreenMessage|AGprintLine|AMlibraryName|ANterminalLocation|AOinstitutionId|BXYYYYYYYYYYYYYYYY|")
public class ACSStatus extends Message {
    private static final long serialVersionUID = -611426325284828647L;
    @PositionedField(start = 2, end = 2)
    private Boolean onlineStatus;
    @PositionedField(start = 3, end = 3)
    private Boolean checkInOk;
    @PositionedField(start = 4, end = 4)
    private Boolean checkOutOk;
    @PositionedField(start = 5, end = 5)
    private Boolean ACSRenewalPolicy;
    @PositionedField(start = 6, end = 6)
    private Boolean statusUpdateOk;
    @PositionedField(start = 7, end = 7)
    private Boolean offlineOk;
    @PositionedField(start = 8, end = 10)
    private Integer timeoutPeriod;
    @PositionedField(start = 11, end = 13)
    private Integer retriesAllowed;
    @PositionedField(start = 14, end = 31)
    private Date dateTimeSync;
    @PositionedField(start = 32, end = 35)
    private ProtocolVersion protocolVersion;
    @TaggedField
    private String institutionId;
    @TaggedField
    private String libraryName;
    @TaggedField
    private SupportedMessages supportedMessages = new SupportedMessages();
    @TaggedField
    private String terminalLocation;
    @TaggedField
    private String screenMessage;
    @TaggedField
    private String printLine;

    public Boolean isCheckInOk() {
        return this.checkInOk;
    }

    public Boolean isCheckOutOk() {
        return this.checkOutOk;
    }

    public Date getDateTimeSync() {
        return this.dateTimeSync;
    }

    public String getInstitutionId() {
        return this.institutionId;
    }

    public String getLibraryName() {
        return this.libraryName;
    }

    public Boolean isOfflineOk() {
        return this.offlineOk;
    }

    public Boolean isOnlineStatus() {
        return this.onlineStatus;
    }

    public String getPrintLine() {
        return this.printLine;
    }

    public ProtocolVersion getProtocolVersion() {
        return this.protocolVersion;
    }

    public Boolean isACSRenewalPolicy() {
        return this.ACSRenewalPolicy;
    }

    public Integer getRetriesAllowed() {
        return this.retriesAllowed;
    }

    public String getScreenMessage() {
        return this.screenMessage;
    }

    public Boolean isStatusUpdateOk() {
        return this.statusUpdateOk;
    }

    public SupportedMessages getSupportedMessages() {
        return this.supportedMessages;
    }

    public String getTerminalLocation() {
        return this.terminalLocation;
    }

    public Integer getTimeoutPeriod() {
        return this.timeoutPeriod;
    }

    public void setTimeoutPeriod(Integer timeoutPeriod) {
        this.timeoutPeriod = timeoutPeriod;
    }

    public void setTerminalLocation(String terminalLocation) {
        this.terminalLocation = terminalLocation;
    }

    /**
     * Use getSupportedMessages().set(SupportedMessages.VALUE)
     * getSupportedMessages().unset(SupportedMessages.VALUE)
     * getSupportedMessages().unsetAll()
     */
    @Deprecated
    public void setSupportedMessages(SupportedMessages supportedMessages) {
        this.supportedMessages = supportedMessages;
    }

    public void setStatusUpdateOk(Boolean statusUpdateOk) {
        this.statusUpdateOk = statusUpdateOk;
    }

    public void setScreenMessage(String screenMessage) {
        this.screenMessage = screenMessage;
    }

    public void setRetriesAllowed(Integer retriesAllowed) {
        this.retriesAllowed = retriesAllowed;
    }

    public void setACSRenewalPolicy(Boolean ACSRenewalPolicy) {
        this.ACSRenewalPolicy = ACSRenewalPolicy;
    }

    public void setProtocolVersion(ProtocolVersion protocolVersion) {
        this.protocolVersion = protocolVersion;
    }

    public void setPrintLine(String printLine) {
        this.printLine = printLine;
    }

    public void setOnlineStatus(Boolean onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    public void setOfflineOk(Boolean offlineOk) {
        this.offlineOk = offlineOk;
    }

    public void setLibraryName(String libraryName) {
        this.libraryName = libraryName;
    }

    public void setInstitutionId(String institutionId) {
        this.institutionId = institutionId;
    }

    public void setDateTimeSync(Date dateTimeSync) {
        this.dateTimeSync = dateTimeSync;
    }

    public void setCheckOutOk(Boolean checkOutOk) {
        this.checkOutOk = checkOutOk;
    }

    public void setCheckInOk(Boolean checkInOk) {
        this.checkInOk = checkInOk;
    }
} @Command("99")
@TestCaseDefault("9900002.00")
@TestCasePopulated("9921231.00")
public class SCStatus extends Message {
    private static final long serialVersionUID = -6198644705404364776L;
    @PositionedField(start = 2, end = 2)
    private StatusCode statusCode;
    @PositionedField(start = 3, end = 5)
    private Integer maxPrintWidth;
    @PositionedField(start = 6, end = 9)
    private ProtocolVersion protocolVersion;

    public Integer getMaxPrintWidth() {
        return this.maxPrintWidth;
    }

    public ProtocolVersion getProtocolVersion() {
        return this.protocolVersion;
    }

    public StatusCode getStatusCode() {
        return this.statusCode;
    }

    public void setStatusCode(StatusCode statusCode) {
        this.statusCode = statusCode;
    }

    public void setProtocolVersion(ProtocolVersion protocolVersion) {
        this.protocolVersion = protocolVersion;
    }

    public void setMaxPrintWidth(Integer maxPrintWidth) {
        this.maxPrintWidth = maxPrintWidth;
    }
} public interface BlockPatronOperation {

	public abstract PatronStatusResponse BlockPatron(BlockPatron msg);

} public interface CheckInOperation {

	public abstract CheckInResponse CheckIn(CheckIn msg);

} public interface CheckOutOperation {

	public abstract CheckOutResponse CheckOut(CheckOut msg);

} public interface EndPatronSessionOperation {

	public abstract EndSessionResponse EndPatronSession(EndPatronSession msg);

} public interface FeePaidOperation {

	public abstract FeePaidResponse FeePaid(FeePaid msg);

} public interface HoldOperation {

	public abstract HoldResponse Hold(Hold msg);

} public interface ItemInformationOperation {

	public abstract ItemInformationResponse ItemInformation(ItemInformation msg);

} public interface ItemStatusUpdateOperation {

	public abstract ItemStatusUpdateResponse ItemStatusUpdate(
			ItemStatusUpdate msg);

} public interface LoginOperation {

	public abstract LoginResponse Login(Login msg);

} public interface PatronEnableOperation {

	public abstract PatronEnableResponse PatronEnable(PatronEnable msg);

} public interface PatronInformationOperation {

	public abstract PatronInformationResponse PatronInformation(
			PatronInformation msg);

} public interface PatronStatusOperation {

	public abstract PatronStatusResponse PatronStatus(PatronStatusRequest msg);

} public interface RenewAllOperation {
    public RenewAllResponse RenewAll(RenewAll msg);

} public interface RenewOperation {

	public abstract RenewResponse Renew(Renew msg);

} public interface RequestResendOperation {

} public interface StatusOperation {

	public abstract ACSStatus Status(SCStatus msg);

} public enum ProtocolVersion implements AbstractEnumeration {
    VERSION_2_00("2.00"),
    VERSION_1_00("1.00");

    private final String code;

    private ProtocolVersion(String code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return this.getCode();
    }

    @Override
    public final String getCode() {
        return this.code;
    }

    @Override
    public final AbstractEnumeration getKey(String code) {
        for (AbstractEnumeration i : ProtocolVersion.values()) {
            if (i.getCode().equals(code)) {
                return i;
            }
        }
        return null;
    }
}
import java.util.Date;
import com.ceridwen.circulation.SIP.messages.ACSStatus;
import com.ceridwen.circulation.SIP.messages.SCStatus;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.BlockPatronOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.CheckInOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.CheckOutOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.EndPatronSessionOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.FeePaidOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.HoldOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.ItemInformationOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.ItemStatusUpdateOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.LoginOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.PatronEnableOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.PatronInformationOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.PatronStatusOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.RenewAllOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.RenewOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.RequestResendOperation;
import com.ceridwen.circulation.SIP.netty.server.driver.operation.StatusOperation;
import com.ceridwen.circulation.SIP.types.enumerations.ProtocolVersion;
/* 
 * Copyright (C) 2020 Ceridwen Limited
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 com.ceridwen.circulation.SIP.netty.server.driver;



public abstract class AbstractDriver implements Driver {

	@Override
	public final ACSStatus Status(SCStatus msg) {