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.dynamic.data.mapping.kernel;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.expando.kernel.model.ExpandoBridge;
020    import com.liferay.portal.kernel.exception.LocaleException;
021    import com.liferay.portal.kernel.exception.PortalException;
022    import com.liferay.portal.kernel.model.StagedGroupedModel;
023    import com.liferay.portal.kernel.theme.ThemeDisplay;
024    
025    import java.io.Serializable;
026    
027    import java.util.Date;
028    import java.util.List;
029    import java.util.Locale;
030    import java.util.Map;
031    import java.util.Set;
032    
033    /**
034     * @author Leonardo Barros
035     */
036    @ProviderType
037    public interface DDMStructure extends StagedGroupedModel {
038    
039            @Override
040            public Object clone();
041    
042            public String[] getAvailableLanguageIds();
043    
044            public List<String> getChildrenFieldNames(String fieldName)
045                    throws PortalException;
046    
047            public String getClassName();
048    
049            public long getClassNameId();
050    
051            @Override
052            public Date getCreateDate();
053    
054            public DDMForm getDDMForm();
055    
056            public DDMFormField getDDMFormField(String fieldName)
057                    throws PortalException;
058    
059            public List<DDMFormField> getDDMFormFields(boolean includeTransientFields);
060    
061            public String getDefaultLanguageId();
062    
063            public String getDefinition();
064    
065            public String getDescription();
066    
067            public String getDescription(Locale locale);
068    
069            public String getDescription(Locale locale, boolean useDefault);
070    
071            public String getDescription(String languageId);
072    
073            public String getDescription(String languageId, boolean useDefault);
074    
075            public String getDescriptionCurrentLanguageId();
076    
077            public String getDescriptionCurrentValue();
078    
079            public Map<Locale, String> getDescriptionMap();
080    
081            @Override
082            public ExpandoBridge getExpandoBridge();
083    
084            public String getFieldDataType(String fieldName) throws PortalException;
085    
086            public String getFieldLabel(String fieldName, Locale locale)
087                    throws PortalException;
088    
089            public String getFieldLabel(String fieldName, String locale)
090                    throws PortalException;
091    
092            public Set<String> getFieldNames();
093    
094            public String getFieldProperty(String fieldName, String property)
095                    throws PortalException;
096    
097            public boolean getFieldRepeatable(String fieldName) throws PortalException;
098    
099            public boolean getFieldRequired(String fieldName) throws PortalException;
100    
101            public String getFieldTip(String fieldName, Locale locale)
102                    throws PortalException;
103    
104            public String getFieldTip(String fieldName, String locale)
105                    throws PortalException;
106    
107            public String getFieldType(String fieldName) throws PortalException;
108    
109            public DDMForm getFullHierarchyDDMForm();
110    
111            @Override
112            public long getGroupId();
113    
114            @Override
115            public Date getModifiedDate();
116    
117            public String getName();
118    
119            public String getName(Locale locale);
120    
121            public String getName(Locale locale, boolean useDefault);
122    
123            public String getName(String languageId);
124    
125            public String getName(String languageId, boolean useDefault);
126    
127            public String getNameCurrentLanguageId();
128    
129            public String getNameCurrentValue();
130    
131            public Map<Locale, String> getNameMap();
132    
133            public long getParentStructureId();
134    
135            public long getPrimaryKey();
136    
137            @Override
138            public Serializable getPrimaryKeyObj();
139    
140            public List<String> getRootFieldNames();
141    
142            public String getStorageType();
143    
144            public long getStructureId();
145    
146            public String getStructureKey();
147    
148            public List<DDMTemplate> getTemplates() throws PortalException;
149    
150            public int getType();
151    
152            @Override
153            public long getUserId();
154    
155            @Override
156            public String getUserName();
157    
158            @Override
159            public String getUserUuid();
160    
161            @Override
162            public String getUuid();
163    
164            public String getWebDavURL(ThemeDisplay themeDisplay, String webDAVToken);
165    
166            public boolean hasField(String fieldName);
167    
168            public boolean isFieldRepeatable(String fieldName) throws PortalException;
169    
170            public boolean isFieldTransient(String fieldName) throws PortalException;
171    
172            public boolean isNew();
173    
174            public void prepareLocalizedFieldsForImport() throws LocaleException;
175    
176            public void prepareLocalizedFieldsForImport(Locale defaultImportLocale)
177                    throws LocaleException;
178    
179            public void setDefinition(String definition);
180    
181            public String toXmlString();
182    
183    }