001/**
002 * Copyright 2005-2017 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.impl.stuck;
017
018import java.time.LocalDateTime;
019import java.time.format.DateTimeFormatter;
020
021public class StuckDocument {
022
023    private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
024
025    private final String documentId;
026    private final String documentTypeLabel;
027    private final LocalDateTime createDate;
028
029    public StuckDocument(String documentId, String documentTypeLabel, LocalDateTime createDate) {
030        this.documentId = documentId;
031        this.documentTypeLabel = documentTypeLabel;
032        this.createDate = createDate;
033    }
034
035    public String getDocumentId() {
036        return documentId;
037    }
038
039    public String getDocumentTypeLabel() {
040        return documentTypeLabel;
041    }
042
043    public LocalDateTime getCreateDate() {
044        return createDate;
045    }
046
047    public String getFormattedCreateDate() {
048        return getCreateDate().format(FORMATTER);
049    }
050
051}