<?xml version="1.0" encoding="UTF-8"?>
<SelfIssue>
  <UI>
    <!--
      This section determines various properties of the user interface including visual and audio elements.
      It has seven sub-elements: SelfIssue, PatronPanel, BookPanel, Messages, Audio, Validation, Control
    -->
    <SelfIssue>
      <!-- Main window settings -->
      <RightIcon_Icon>uk/ac/ox/las/images/crest.gif</RightIcon_Icon>
      <!-- Right hand image file -->
      <LeftIcon_Icon>uk/ac/ox/las/images/olis.gif</LeftIcon_Icon>
      <!-- Left hand image file -->
      <TitleText_Text>OLIS Self Issue</TitleText_Text>
      <!-- Main title text -->
      <LibraryText_Text>CHANGEME Library</LibraryText_Text>
      <!-- Sub title text -->
    </SelfIssue>
    <PatronPanel>
      <!-- Patron panel settings -->
      <PatronSalutation_Text>Hello </PatronSalutation_Text>
      <PatronField_DefaultText/>
      <CardIcon_Icon>uk/ac/ox/las/images/card.gif</CardIcon_Icon>
      <PatronFieldLabel_Text>Please scan in your barcode number using the hand held scanner: </PatronFieldLabel_Text>
      <PatronFieldLabel_ToolTipText>Please enter the barcode number from your university card.</PatronFieldLabel_ToolTipText>
      <PatronField_ToolTipText>Scan your University barcode using the hand held scanner.</PatronField_ToolTipText>
      <PatronPanelNextButton_Text>Next</PatronPanelNextButton_Text>
      <PatronPanelNextButton_ToolTipText>Next</PatronPanelNextButton_ToolTipText>
      <PatronPanelResetButton_ToolTipText>Clear any entries</PatronPanelResetButton_ToolTipText>
      <PatronPanelResetButton_Text>Clear</PatronPanelResetButton_Text>
    </PatronPanel>
    <BookPanel>
      <BooksIcon_Icon>uk/ac/ox/las/images/books.gif</BooksIcon_Icon>
      <PatronText_DefaultText/>
      <PatronText_ToolTipText>List of books already checked out.</PatronText_ToolTipText>
      <StatusText_DefaultText/>
      <StatusText_ToolTipText>Status</StatusText_ToolTipText>
      <BookFieldLabel_Text>Please scan book barcode using the hand held scanner: </BookFieldLabel_Text>
      <BookFieldLabel_ToolTipText>Please enter the barcode of the next book to check out.</BookFieldLabel_ToolTipText>
      <BookField_ToolTipText>Please enter the barcode of the next book to check out.</BookField_ToolTipText>
      <CheckoutButton_Text>Check Out</CheckoutButton_Text>
      <CheckoutButton_ToolTipText>Check Out</CheckoutButton_ToolTipText>
      <BookPanelNextButton_Text>Finish</BookPanelNextButton_Text>
      <BookPanelNextButton_ToolTipText>Login as new borrower.</BookPanelNextButton_ToolTipText>
      <BookPanelResetButton_Text>Back and Finish</BookPanelResetButton_Text>
      <BookPanelResetButton_ToolTipText>Login as new borrower.</BookPanelResetButton_ToolTipText>
    </BookPanel>
    <Messages>
      <!--
      Message texts displayed to the user.
      ^ is used to indicate a line break
      {0}, {1] etc. will be replaced by message specific strings.
    -->
      <GreetPatron>Hello {0}^Please begin checking out your books.</GreetPatron>
      <!-- {0} = patron name
           {1} = barcode-->
      <CheckingPatronMessage>Checking for barcode {0}^Please wait...</CheckingPatronMessage>
      <!-- {0} = item barcode -->
      <InvalidPatronBarcode>The barcode entered is not valid.</InvalidPatronBarcode>
      <PatronRetry>Please confirm your borrower id.</PatronRetry>
      <PatronNetworkError>Your borrower id {0} was not recognised.^Please check and re-enter.^(This error may occur if there are network problems)</PatronNetworkError>
      <!-- {0} = borrower id -->
      <InvalidPatronError>An account with id {0} could not be found - please check and re-enter.^^The error reported by the server is: {1}.</InvalidPatronError>
      <!-- {0} = borrower id; {1} = message from server -->
      <BlockedPatronError>There appears to be an problem with your account - please contact a member of staff.^^The error reported by the server is: {0}.</BlockedPatronError>
      <!-- {0} = message from server -->
      <UnexpectedPatronError>An unexpected error occurred. Please contact a member of staff.</UnexpectedPatronError>
      <CheckoutPendingMessage>Checking barcode {0}. Please wait...</CheckoutPendingMessage>
      <!-- {0} = item barcode -->
      <InvalidItemBarcode>The barcode entered is not valid.</InvalidItemBarcode>
      <CheckoutRetry>Please re-enter item barcode.</CheckoutRetry>
      <CheckOutSuccess>&lt;font color=&quot;Red&quot;&gt;&lt;strong&gt;Item {0} has been checked out.&lt;/strong&gt;&lt;/font&gt;</CheckOutSuccess>
      <DueDateMessage>Due date is {0}.</DueDateMessage>
      <!-- {0} due date from server -->
      <!--
        The following messages allow html formatting (must be escaped)
        b (bold) only applies to the last entry
      -->
      <NoDueDateMessage>&lt;b&gt;Your patron record will be updated shortly.&lt;/b&gt;</NoDueDateMessage>
      <CheckoutNetworkError>&lt;font color=&quot;Red&quot;&gt;Item ({0}) could not be checked out - please try again^(This error may occur if there are network problems).&lt;/font&gt;</CheckoutNetworkError>
      <!-- {0} = item id  -->
      <CheckoutFailedError>&lt;font color=&quot;Red&quot;&gt;Item ({0}) could not be checked out. Server gave reason as: {1}.&lt;/font&gt;</CheckoutFailedError>
      <!-- {0} = item id; {1} = message from server -->
      <UnexpectedCheckoutError>&lt;font color=&quot;Red&quot;&gt;Item ({0}) could not be checked out due to an unexpected error.&lt;/font&gt;</UnexpectedCheckoutError>
      <!-- {0} = item id  -->
      <UnlockFailedError>&lt;font color=&quot;Red&quot;&gt;&lt;b&gt;Item ({0}) could not be checked out as it could not be de-alarmed - please try again.&lt;/b&gt;&lt;/font&gt;</UnlockFailedError>
      <!-- {0} = item id  -->
      <UnlockFailedCheckInFailedError>&lt;font color=&quot;Red&quot;&gt;&lt;b&gt;Item ({0}) has been checked out but is still alarmed - please contact a member of staff.&lt;/b&gt;&lt;/font&gt;</UnlockFailedCheckInFailedError>
      <!-- {0} = item id  -->
    </Messages>
    <Audio>
      <!--
      Audio feedback for messages
      leave blank the entries for silent operation

      Possibly entries include
        uk/ac/ox/las/audio/success.wav
        uk/ac/ox/las/audio/warning.wav
        uk/ac/ox/las/audio/error.wav-->
      <ValidPatron/>
      <CheckOutSuccess/>
      <PatronRetry/>
      <CheckoutRetry/>
      <InvalidPatronBarcode/>
      <PatronNetworkError/>
      <InvalidPatronError/>
      <BlockedPatronError/>
      <UnexpectedPatronError/>
      <InvalidItemBarcode/>
      <CheckoutNetworkError/>
      <CheckoutFailedError/>
      <UnexpectedCheckoutError/>
      <UnlockFailedError/>
      <UnlockFailedCheckInFailedError/>
    </Audio>
    <Validation>
      <!--
      Pattern matching check on entered barcodes - leave blank for no validation
      -->
      <PatronBarcodeMask>([24]\d{6})|([a-zA-Z][a-zA-Z,. -]+)</PatronBarcodeMask>
      <!-- e.g. Use [24]\d{6} for 2 or 4 followed by 6 digits -->
      <ItemBarcodeMask>[36]\d{8}</ItemBarcodeMask>
      <!-- e.g. Use [36]\d{8} for 3 or 6 followed by 8 digits -->
    </Validation>
    <Control>
      <ResetTimeout>120</ResetTimeout>
      <!-- Idle time is seconds before the software resets to the patron screen -->
    </Control>
    <WatchDog>
      <!-- Background monitoring system - do not change -->
      <Timer>60</Timer>
      <CriticalSectionThreshold>5</CriticalSectionThreshold>
      <MinimumMemory>4</MinimumMemory>
    </WatchDog>
  </UI>
  <Systems>
    <!--
  This section configures the connections for the various external communications.
  -->
    <Printer>
      <!--
    This allows optional receipt printing
    -->
      <PrintReceipt>false</PrintReceipt>
    </Printer>
    <SIP mode="Socket">
      <!--
      This contains the connection details for the 3M SIP server (NISO CIP to be supported in a future version).
      Currently supports 3M SIP over Telnet or Socket
      -->
      <Host>127.0.0.1</Host>
      <!--
      IP address of 3M SIP server or stunnel
      -->
      <Port>5001</Port>
      <!--
      IP Port of 3M SIP Server or stunnel
      -->
      <Username></Username>
      <!--
      Telnet username
      -->
      <Password></Password>
      <!--
      Telnet password (encrypted)
      -->
      <LoggedOnText></LoggedOnText>
      <!--
      Text to look for to confirm logon
      -->
      <ConnectionTimeout>1</ConnectionTimeout>
      <!--
      Time (seconds) to wait during initial connection
      -->
      <IdleTimeout>15</IdleTimeout>
      <!--
      Time (seconds) to wait when awaiting response to a transaction
      -->
      <RetryAttempts>2</RetryAttempts>
      <!--
      Number of reconnection attempts if initial connection fails
      -->
      <RetryWait>500</RetryWait>
      <!--
      Time (ms) to wait between connection retries
      -->
    </SIP>
    <Security class="com.ceridwen.selfissue.client.nulldevices.SecurityDevice">
      <!--
      This allows optional support for local security tagging and gates (currently only Intellitag RFID support)
      -->
      <Retries>1</Retries>
      <Timeout>2</Timeout>
    </Security>
    <Loggers>
      <!--
    The self client will need to communicate to local library staff in certain circumstances.
    This contains Logger sections defining how to communicate to staff
    -->
      <Logger class="com.ceridwen.selfissue.client.log.MailLogger">
        <!--
      E-mail based logger
      -->
        <EventMask>108</EventMask>
        <!--
        Indicates which events generate messages to library staff. Logical OR of the following values:

        0x0001: E-Mail with subject "Self Issue Checkout Report: Checkout Success Notification (no action required)"
                will be sent whenever a checkout is successfully performed on the 3M server (and reported to the user).
                It is anticipated that this would normally be suppressed unless a full record of activity is needed.
        0x0002: E-Mail with subject "Self Issue Checkout Report: Checkout Failure Notification (no action required)"
                whenever a checkout cannot be completed and the user is informed that the checkout has failed.
                This would normally be suppressed, but might be required to be recorded if there is a danger that
                the user would attempt to remove the item anyway.
        0x0004: E-Mail with subject "Self Issue Checkout Report: Checkout Pending Notification (no action required)"
                An item has been issued to an user when the 3M system was unavailable, and the checkout request has
                been spooled for an abnormally long amount of time (Systems/Spooler/). This is a warning message that there
                may be a problem with the Self Issue client's communication with the 3M server, the 3M server has been unavailable
                for an abnormal amount of time, or there is a network problem. No action is required as the client will
                continue to attempt to commit the checkout, but these warning should be kept in case of a synchronisation mismatch
                (e.g. if the patron returns the item before the checkout can be committed)
        0x0008: E-Mail with subject "Self Issue Checkout Report: Manual Intervention Required (action required)"
                is generated if an item has been issued to an user, but the Self Issue client was unable to commit the checkout
                to the 3M server. This can occur in two cases: (i) the user would not normally be allowed to checkout the
                item but the Self Issue client is running in Trust Mode or Offline Mode when the item was checked out;
                (ii) the item was spooled in Offline mode, but the 3M server has not been available for the designated maximum
                life an item can be kept in the spooler (Systems/Spooler/)
        0x0010: E-Mail with subject "Self Issue Checkout Report: Notification (no action required)"
                will be sent whenever a message is successfully sent to the 3M server.
                It is anticipated that this would normally be suppressed unless a full record of activity is needed.
        0x0020: Applicable for security system support - sends a message if security device on item could not be unlocked successfully. 
                Action may be required, but the user would be prompted to retry. An attempt is made to cancel the checkout.
        0x0040: Applicable for security system support - sends a message if a cancel checkout could not be performed after an unlock
                failure. Action may be required - the user is warned that the book is checked out but still alarmed and
                advised to consult a member of staff.
        -->
        <ReplayPeriod>15</ReplayPeriod>
        <!--
        Messages may be spooled if the SMTP relay is not available. This indicates how often the spool is checked for stored messages (minutes)
        -->
        <To>CHANGEME</To>
        <!--
        Address to send messages to
        -->
        <From>donotreply.olis@bodleian.ox.ac.uk</From>
        <!--
        Address from which messages are sent
        -->
        <Relay>smtp.ox.ac.uk</Relay>
        <!--
        SMTP relay
        -->
        <ConnectionTimeout>1</ConnectionTimeout>
        <!--
        Time (seconds) to wait during initial connection
        -->
        <IdleTimeout>5</IdleTimeout>
        <!--
        Time (seconds) to wait when awaiting response
        -->
        <Spool>c:/temp/spools/logger1</Spool>
        <!--
        Directory to store spooled messages
        -->
      </Logger>
    </Loggers>
    <Spooler>
      <!--
    Local spool for offline stored requests
    -->
      <ReplayPeriod>15</ReplayPeriod>
      <!--
      Time (minutes) to replay spooler
      -->
      <OverdueAgeWarn>24</OverdueAgeWarn>
      <!--
      Time (hours) item can remain in spooler before generating warning message
      -->
      <OverdueAgeExpire>48</OverdueAgeExpire>
      <!--
      Time (hours) item can remain in spooler before generating manual intervention message
      -->
      <Spool>c:/temp/spools/spooler</Spool>
      <!--
      directory to store spooled request
      -->
    </Spooler>
  </Systems>
  <Modes>
    <!--
  This section configures the behaviour of the Self Issue client software.
  -->
    <TrustMode>true</TrustMode>
    <!--
    When false, an item will only be reported issued if the 3M server allows the item to be issued;
    if the 3M server fails the issue the reason will be reported to the end user.

    When true, an item will always be reported issued.
    If the issue cannot be committed by the client to the 3M server (e.g. if the borrower has too many items out),
    a message is sent to the librarian (using the method specified in the Systems/Loggers section) requesting manual intervention.
    -->
    <AllowOffline>true</AllowOffline>
    <!--
    Applies only if not in Trust Mode (AllowOffline is always true when in Trust Mode).

    When AllowOffline is false (and TrustMode is false), any attempts to issue an item when the 3M server is unavailable
    will be refused with a "network error" message to the user.

    When AllowOffline is true, any attempt to issue an item when the 3M server is unavailable will result in the item
    being reported issued to the user. These transactions are spooled on the client and then played back to the 3M server
    when it is available again (any items which cannot be committed automatically will generate a message to the librarian
    using the method specified in Systems/Loggers for manual intervention).
    -->
    <UseNoBlock>false</UseNoBlock>
    <!--
    Can be set to true if the 3M server supports NoBlock when running in Trust or Offline modes
    in this case the 3M server is responsible for reporting cases where manual intervention is 
    required rather than the self issue client.
    -->
    <RetryPatronWhenError>false</RetryPatronWhenError>
    <!--
    If running in Trust Mode or Offline Mode the Self Issue client may not be able to confirm that the patron id is valid.
    If RetryPatronWhenError is false, the Self Issue client will assume that the entered patron id is always valid;
    if true the Self Issue client will request the patron id to be re-entered if it cannot confirm validity and only continue if the patron id is entered identically twice.
    -->
    <RetryItemWhenError>false</RetryItemWhenError>
    <!--
    If running in Trust Mode or Offline Mode the Self Issue client may not be able to confirm that the item id is valid.
    If RetryItemWhenError is false, the Self Issue client will assume that the entered item id is always valid;
    if true the Self Issue client will request the item id to be re-entered if it cannot confirm validity and only continue
    if the item id is entered identically twice.
    -->
    <AllowRenews>true</AllowRenews>
    <!--
    If false the 3M server will return an error if an attempt is made to issue an item already checked out to that patron;
    if true the 3M server will be told to interpret the check-out as a renewal request.
    -->
    <SendShutdownStatus>true</SendShutdownStatus>
    <!--
    If true will send a status update when client shutdown
    -->
  </Modes>
  <CommandInterface>
    <!--
  Enable various debugging/testing features
  -->
    <AllowConnectionTest>true</AllowConnectionTest>
    <!--
    AllowConnectionTest: Allows *Test Connection command in the patron panel (tests SIP connectivity)
    -->
    <AllowSystemsCheck>true</AllowSystemsCheck>
    <!--
    AllowSystemsCheck: Allow *Check Systems command in the patron panel (indicates current modes, memory and spool use)
    -->
    <AllowLogTest>true</AllowLogTest>
    <!--
    AllowLogTest: Allow *Test Crash command in the patron panel (tests unexpected error handling)
    -->
    <AllowSystemShutdown>true</AllowSystemShutdown>
    <!--
    AllowSystemShutdown: Allow *Shutdown System command in the patron panel (closes Self Issue client after password check)
    -->
    <SystemShutdownPassword>D2EBEBBDEFBF075F</SystemShutdownPassword>
    <!--
    SystemShutdownPassword: Password for shutting down Self Issue (encrypted use encode.bat <password> to generated encrypted version)
    -->
  </CommandInterface>
  <Logging>
    <!--
    Handles alerting of unexpected errors - do not edit
    -->
    <SMTPHandler>
      <level>SEVERE</level>
      <smtpServer>smtp.ox.ac.uk</smtpServer>
      <recipients>selfissue.errors@ceridwen.com</recipients>
    </SMTPHandler>
  </Logging>
</SelfIssue>
