001    /**
002     * Copyright (c) 2000-present 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.dynamicdatamapping;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.model.StagedGroupedModel;
019    
020    import java.util.List;
021    import java.util.Locale;
022    import java.util.Map;
023    import java.util.Set;
024    
025    /**
026     * @author Leonardo Barros
027     */
028    public interface DDMStructure extends StagedGroupedModel {
029    
030            public List<String> getChildrenFieldNames(String fieldName)
031                    throws PortalException;
032    
033            public long getClassNameId();
034    
035            public DDMForm getDDMForm();
036    
037            public DDMFormField getDDMFormField(String fieldName)
038                    throws PortalException;
039    
040            public List<DDMFormField> getDDMFormFields(boolean includeTransientFields);
041    
042            public String getDefinition();
043    
044            public String getDescription();
045    
046            public String getDescription(Locale locale);
047    
048            public Map<Locale, String> getDescriptionMap();
049    
050            public String getFieldDataType(String fieldName) throws PortalException;
051    
052            public Set<String> getFieldNames();
053    
054            public String getFieldProperty(String fieldName, String property)
055                    throws PortalException;
056    
057            public String getFieldType(String fieldName) throws PortalException;
058    
059            public DDMForm getFullHierarchyDDMForm();
060    
061            @Override
062            public long getGroupId();
063    
064            public String getName();
065    
066            public String getName(Locale locale);
067    
068            public String getName(Locale locale, boolean useDefault);
069    
070            public Map<Locale, String> getNameMap();
071    
072            public long getParentStructureId();
073    
074            public long getPrimaryKey();
075    
076            public List<String> getRootFieldNames();
077    
078            public long getStructureId();
079    
080            public String getStructureKey();
081    
082            public int getType();
083    
084            @Override
085            public long getUserId();
086    
087            public boolean hasField(String fieldName);
088    
089            public boolean isFieldTransient(String fieldName) throws PortalException;
090    
091            public void setDefinition(String definition);
092    
093    }