/** * Returns the owner ID of this portlet preferences. * * @return the owner ID of this portlet preferences */ @Override public long getOwnerId() { return _portletPreferences.getOwnerId(); }
/** * Returns the preferences of this portlet preferences. * * @return the preferences of this portlet preferences */ @Override public String getPreferences() { return _portletPreferences.getPreferences(); }
/** * Returns the company ID of this portlet preferences. * * @return the company ID of this portlet preferences */ @Override public long getCompanyId() { return _portletPreferences.getCompanyId(); }
public static PortletPreferencesSoap toSoapModel(PortletPreferences model) { PortletPreferencesSoap soapModel = new PortletPreferencesSoap(); soapModel.setMvccVersion(model.getMvccVersion()); soapModel.setPortletPreferencesId(model.getPortletPreferencesId()); soapModel.setCompanyId(model.getCompanyId()); soapModel.setOwnerId(model.getOwnerId()); soapModel.setOwnerType(model.getOwnerType()); soapModel.setPlid(model.getPlid()); soapModel.setPortletId(model.getPortletId()); soapModel.setPreferences(model.getPreferences()); return soapModel; }
portletPreferencesModel.getPlid()); layout.getCompanyId(), portletPreferencesModel.getOwnerId(), portletPreferencesModel.getOwnerType(), portletPreferencesModel.getPlid(), portletPreferencesModel.getPortletId(), portletPreferencesModel.getPreferences()); portletPreferencesModel.getCompanyId(), com.liferay.portal.kernel.model.PortletPreferences.class. getName(), _assetPublisherWebUtil.getSubscriptionClassPK( portletPreferencesModel.getPlid(), portletPreferencesModel.getPortletId()));
@Override public Long get(PortletPreferences portletPreferences) { return portletPreferences.getPortletPreferencesId(); }
/** * Sets the preferences of this portlet preferences. * * @param preferences the preferences of this portlet preferences */ @Override public void setPreferences(String preferences) { _portletPreferences.setPreferences(preferences); }
/** * Returns the owner type of this portlet preferences. * * @return the owner type of this portlet preferences */ @Override public int getOwnerType() { return _portletPreferences.getOwnerType(); }
/** * Returns the plid of this portlet preferences. * * @return the plid of this portlet preferences */ @Override public long getPlid() { return _portletPreferences.getPlid(); }
/** * Returns the portlet ID of this portlet preferences. * * @return the portlet ID of this portlet preferences */ @Override public String getPortletId() { return _portletPreferences.getPortletId(); }
@Override public Object clone() { return new PortletPreferencesWrapper((PortletPreferences)_portletPreferences.clone()); }
/** * Returns the portlet preferences ID of this portlet preferences. * * @return the portlet preferences ID of this portlet preferences */ @Override public long getPortletPreferencesId() { return _portletPreferences.getPortletPreferencesId(); }
@Override public void importServicePortletPreferences( PortletDataContext portletDataContext, Element serviceElement) throws PortalException { long ownerId = GetterUtil.getLong( serviceElement.attributeValue("owner-id")); int ownerType = GetterUtil.getInteger( serviceElement.attributeValue("owner-type")); String serviceName = serviceElement.attributeValue("service-name"); if (ownerType == PortletKeys.PREFS_OWNER_TYPE_GROUP) { ownerId = portletDataContext.getGroupId(); } else if (ownerType == PortletKeys.PREFS_OWNER_TYPE_COMPANY) { ownerId = portletDataContext.getCompanyId(); } PortletPreferences portletPreferences = getPortletPreferences( portletDataContext.getCompanyId(), ownerId, ownerType, LayoutConstants.DEFAULT_PLID, serviceName); for (Attribute attribute : serviceElement.attributes()) { serviceElement.remove(attribute); } String xml = serviceElement.asXML(); portletPreferences.setPreferences(xml); _portletPreferencesLocalService.updatePortletPreferences( portletPreferences); }
/** * @deprecated As of Judson (7.1.x), replaced by {@link * deletePortletData(PortletDataContext portletDataContext, * javax.portlet.PortletPreferences portletPreferences)} */ @Deprecated protected String deletePortletData( PortletDataContext portletDataContext, PortletPreferences portletPreferences) throws Exception { javax.portlet.PortletPreferences portletPreferencesImpl = PortletPreferencesFactoryUtil.fromDefaultXML( portletPreferences.getPreferences()); return deletePortletData(portletDataContext, portletPreferencesImpl); }
if (portletPreferences.getOwnerId() == PortletKeys.PREFS_OWNER_ID_DEFAULT) { portletDataContext, portletPreferences.getOwnerId(), PortletKeys.PREFS_OWNER_TYPE_USER, defaultUser, layout, plid, portletDataContext.getPortletId(), portletElement);
public long getSubscriptionClassPK( long ownerId, int ownerType, long plid, String portletId) throws PortalException { if (PortletIdCodec.hasUserId(portletId)) { ownerId = PortletIdCodec.decodeUserId(portletId); ownerType = PortletKeys.PREFS_OWNER_TYPE_USER; } com.liferay.portal.kernel.model.PortletPreferences portletPreferencesModel = _portletPreferencesLocalService.getPortletPreferences( ownerId, ownerType, plid, portletId); return portletPreferencesModel.getPortletPreferencesId(); }
/** * @deprecated As of Judson (7.1.x), replaced by {@link * #importPortletData(PortletDataContext portletDataContext, * javax.portlet.PortletPreferences portletPreferences, Element * portletDataElement)} */ @Deprecated public String importPortletData( PortletDataContext portletDataContext, PortletPreferences portletPreferences, Element portletDataElement) throws Exception { PortletPreferencesImpl portletPreferencesImpl = null; if (portletPreferences != null) { portletPreferencesImpl = (PortletPreferencesImpl) PortletPreferencesFactoryUtil.fromDefaultXML( portletPreferences.getPreferences()); } return importPortletData( portletDataContext, portletPreferencesImpl, portletDataElement); }
public static long getSubscriptionClassPK( long ownerId, int ownerType, long plid, String portletId) throws PortalException { if (plid != LayoutConstants.DEFAULT_PLID) { Layout layout = _layoutLocalService.fetchLayout(plid); if (layout != null) { long userId = 0; if (PortletIdCodec.hasUserId(portletId)) { userId = PortletIdCodec.decodeUserId(portletId); } PortletPreferencesIds portletPreferencesIds = _portletPreferencesFactory.getPortletPreferencesIds( layout.getGroupId(), userId, layout, portletId, false); ownerId = portletPreferencesIds.getOwnerId(); ownerType = portletPreferencesIds.getOwnerType(); plid = portletPreferencesIds.getPlid(); portletId = portletPreferencesIds.getPortletId(); } } if (PortletIdCodec.hasUserId(portletId)) { ownerId = PortletIdCodec.decodeUserId(portletId); ownerType = PortletKeys.PREFS_OWNER_TYPE_USER; } com.liferay.portal.kernel.model.PortletPreferences portletPreferencesModel = _portletPreferencesLocalService.getPortletPreferences( ownerId, ownerType, plid, portletId); return portletPreferencesModel.getPortletPreferencesId(); }
throws Exception { String preferencesXML = portletPreferences.getPreferences();
throws Exception { String preferencesXML = portletPreferences.getPreferences();