return pp != null ? pp.getUserPref() : null;
}
public void addUserPref(String addedUserPref) throws Exception
{
DataStorage service = getApplicationComponent(DataStorage.class);
org.exoplatform.portal.pom.spi.gadget.Gadget gadget = service.load(state, ApplicationType.GADGET);
if (gadget == null)
{
gadget = new org.exoplatform.portal.pom.spi.gadget.Gadget();
}
//
gadget.addUserPref(addedUserPref);
//
state = service.save(state, gadget);
// WARNING :
// This is used to force a state save and it should not be copied else where to make things
// convenient as this could lead to a severe performance degradation
ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);