001/* 002 * (C) Copyright 2007 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id$ 020 */ 021 022package org.nuxeo.ecm.platform.ui.web.pathelements; 023 024import javax.faces.context.FacesContext; 025 026import org.nuxeo.ecm.core.api.DocumentModel; 027import org.nuxeo.ecm.platform.ui.web.util.ComponentUtils; 028 029/** 030 * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a> 031 */ 032public class ArchivedVersionsPathElement implements PathElement { 033 034 public static final String TYPE = "ArchivedVersionsPathElement"; 035 036 private static final long serialVersionUID = 8965065837815754773L; 037 038 private final DocumentModel docModel; 039 040 public ArchivedVersionsPathElement(DocumentModel docModel) { 041 this.docModel = docModel; 042 } 043 044 @Override 045 public String getName() { 046 FacesContext context = FacesContext.getCurrentInstance(); 047 return ComponentUtils.translate(context, "label.archivedVersions"); 048 } 049 050 @Override 051 public String getType() { 052 return TYPE; 053 } 054 055 @Override 056 public boolean isLink() { 057 return false; 058 } 059 060 public DocumentModel getDocumentModel() { 061 return docModel; 062 } 063 064}