/** * @deprecated As of Judson (7.1.x), replaced by {@link * #importReferenceStagedModel(PortletDataContext, Class, * Serializable)} */ @Deprecated public static void importReferenceStagedModel( PortletDataContext portletDataContext, Class<?> stagedModelClass, long classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, stagedModelClass, Long.valueOf(classPK)); }
/** * @deprecated As of Judson (7.1.x), replaced by {@link * #importReferenceStagedModel(PortletDataContext, String, * Serializable)} */ @Deprecated public static void importReferenceStagedModel( PortletDataContext portletDataContext, String stagedModelClassName, long classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, stagedModelClassName, Long.valueOf(classPK)); }
/** * @deprecated As of Judson (7.1.x), replaced by {@link * #importReferenceStagedModel(PortletDataContext, StagedModel, * Class, Serializable)} */ @Deprecated public static <T extends StagedModel> void importReferenceStagedModel( PortletDataContext portletDataContext, T referrerStagedModel, Class<?> stagedModelClass, long classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, referrerStagedModel, stagedModelClass, Long.valueOf(classPK)); }
/** * Imports the staged model that is referenced by a portlet. To import a * staged model referenced by another staged model, use {@link * #importReferenceStagedModel(PortletDataContext, StagedModel, Class, * long)}. * * @param portletDataContext the portlet data context of the current * process * @param stagedModelClass the class of the referenced staged model to be * imported * @param classPK the primary key of the referenced staged model to be * imported * @throws PortletDataException if a portlet data exception occurred */ public static void importReferenceStagedModel( PortletDataContext portletDataContext, Class<?> stagedModelClass, Serializable classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, stagedModelClass.getName(), classPK); }
/** * @deprecated As of Judson (7.1.x), replaced by {@link * #importReferenceStagedModel(PortletDataContext, StagedModel, * String, Serializable)} */ @Deprecated public static <T extends StagedModel> void importReferenceStagedModel( PortletDataContext portletDataContext, T referrerStagedModel, String stagedModelClassName, long classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, referrerStagedModel, stagedModelClassName, Long.valueOf(classPK)); }
/** * Imports the staged model that is referenced by another staged model. To * import a staged model referenced by a portlet, use {@link * #importReferenceStagedModel(PortletDataContext, Class, long)}. * * @param portletDataContext the portlet data context of the current * process * @param referrerStagedModel the staged model that references the staged * model to be imported * @param stagedModelClass the class of the referenced staged model to be * imported * @param classPK the primary key of the referenced staged model to be * imported * @throws PortletDataException if a portlet data exception occurred */ public static <T extends StagedModel> void importReferenceStagedModel( PortletDataContext portletDataContext, T referrerStagedModel, Class<?> stagedModelClass, Serializable classPK) throws PortletDataException { importReferenceStagedModel( portletDataContext, referrerStagedModel, stagedModelClass.getName(), classPK); }
public static <T extends StagedModel> void importReferenceStagedModels( PortletDataContext portletDataContext, T referrerStagedModel, Class<?> stagedModelClass) throws PortletDataException { List<Element> referenceElements = portletDataContext.getReferenceElements( referrerStagedModel, stagedModelClass); for (Element referenceElement : referenceElements) { Serializable classPK = GetterUtil.getString( referenceElement.attributeValue("class-pk")); importReferenceStagedModel( portletDataContext, referrerStagedModel, stagedModelClass, classPK); } }
referenceElement.attributeValue("class-pk")); StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, stagedModel, AssetCategory.class, classPK);
referenceElement.attributeValue("class-pk")); StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, stagedModel, AssetTag.class, classPK);
referenceElement.attributeValue("class-pk")); StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, stagedModel, className, classPK);
protected void importLayoutReferences(PortletDataContext portletDataContext) throws PortletDataException { Element importDataRootElement = portletDataContext.getImportDataRootElement(); Element referencesElement = importDataRootElement.element("references"); if (referencesElement == null) { return; } List<Element> referenceElements = referencesElement.elements(); for (Element referenceElement : referenceElements) { String className = referenceElement.attributeValue("class-name"); if (!className.equals(Layout.class.getName())) { continue; } long classPK = GetterUtil.getLong( referenceElement.attributeValue("class-pk")); StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, className, Long.valueOf(classPK)); } }
StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, stagedModel, DLFileEntry.class, classPK);
StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, className, Long.valueOf(classPK));
StagedModelDataHandlerUtil.importReferenceStagedModel( portletDataContext, stagedModel, JournalFeed.class, classPK);