001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.documentlibrary.ddm;
016    
017    import com.liferay.portal.kernel.language.LanguageUtil;
018    import com.liferay.portal.util.PortletKeys;
019    import com.liferay.portlet.documentlibrary.model.DLFileEntryMetadata;
020    import com.liferay.portlet.documentlibrary.service.permission.DLPermission;
021    import com.liferay.portlet.dynamicdatamapping.storage.StorageType;
022    import com.liferay.portlet.dynamicdatamapping.util.BaseDDMDisplay;
023    
024    import java.util.Locale;
025    
026    /**
027     * @author Eduardo Garcia
028     */
029    public class DLDDMDisplay extends BaseDDMDisplay {
030    
031            @Override
032            public String getPortletId() {
033                    return PortletKeys.DOCUMENT_LIBRARY;
034            }
035    
036            @Override
037            public String getResourceName() {
038                    return DLPermission.RESOURCE_NAME;
039            }
040    
041            @Override
042            public String getStorageType() {
043                    return StorageType.XML.toString();
044            }
045    
046            @Override
047            public String getStructureName(Locale locale) {
048                    return LanguageUtil.get(locale, "metadata-set");
049            }
050    
051            @Override
052            public String getStructureType() {
053                    return DLFileEntryMetadata.class.getName();
054            }
055    
056    }