本文整理汇总了Java中com.liferay.portal.ModelListenerException类的典型用法代码示例。如果您正苦于以下问题:Java ModelListenerException类的具体用法?Java ModelListenerException怎么用?Java ModelListenerException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelListenerException类属于com.liferay.portal包,在下文中一共展示了ModelListenerException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onAfterCreate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterCreate(Object model) throws ModelListenerException {
com.liferay.portal.model.User mdlObj = (com.liferay.portal.model.User) model;
try {
List<NewsletterConfig> configs = NewsletterConfigLocalServiceUtil.findByConfigKey("syncUsers");
if (configs.size() > 0 && "1".equals(configs.get(0).getConfigValue())) {
List<Subscription> subs = SubscriptionLocalServiceUtil.findByEmail(mdlObj.getEmailAddress());
if (subs.size() > 0) {
for (Subscription sub : subs) {
sub.setEmail("");
sub.setUserId(mdlObj.getUserId());
SubscriptionLocalServiceUtil.updateSubscription(sub);
}
}
}
} catch (com.liferay.portal.kernel.exception.SystemException ex) {
Logger.getLogger(WcsRegistrationAction.class.getName()).log(Level.SEVERE, null, ex);
}
}
示例2: onAfterCreate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterCreate(DDLRecord model) throws ModelListenerException {
try {
super.onAfterCreate(model);
sendNotification(model, true);
} catch (PortalException | SystemException e) {
e.printStackTrace();
}
}
示例3: onAfterUpdate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterUpdate(DDLRecord model) throws ModelListenerException {
try {
super.onAfterUpdate(model);
sendNotification(model, false);
} catch (PortalException | SystemException e) {
e.printStackTrace();
}
}
示例4: onAfterCreate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterCreate(final T model) throws ModelListenerException {
m_objLog.trace("onAfterCreate::start");
this.m_objRepo.notifyCreate(model);
super.onAfterCreate(model);
m_objLog.trace("onAfterCreate::end");
}
示例5: onAfterRemove
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterRemove(final T model) throws ModelListenerException {
m_objLog.trace("onAfterRemove::start");
this.m_objRepo.notifyDelete(model);
super.onAfterUpdate(model);
m_objLog.trace("onAfterRemove::end");
}
示例6: onAfterUpdate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterUpdate(final T model) throws ModelListenerException {
m_objLog.trace("onAfterUpdate::start");
this.m_objRepo.notifyUpdate(model);
super.onAfterUpdate(model);
m_objLog.trace("onAfterUpdate::end");
}
示例7: onAfterCreate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterCreate(SocialActivity model)
throws ModelListenerException {
if (_log.isDebugEnabled()) {
_log.debug("onAfterCreate(model = " + JSONFactoryUtil.serialize(model) + ")");
}
try {
MessageSender.sendMessage(model);
} catch (SystemException e) {
_log.error(e);
}
}
示例8: onAfterRemove
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterRemove(JournalArticle article) throws ModelListenerException {
logChange(article);
super.onAfterRemove(article);
}
示例9: onAfterUpdate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterUpdate(JournalArticle article) throws ModelListenerException {
logChange(article);
super.onAfterUpdate(article);
}
示例10: onAfterAddAssociation
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterAddAssociation(Object classPK,
String associationClassName, Object associationClassPK)
throws ModelListenerException {
// TODO Auto-generated method stub
}
示例11: onAfterCreate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterCreate(Object model) throws ModelListenerException {
User user = (User) model;
_log.info("Executing code after creation of user : "
+ user.getEmailAddress());
}
示例12: onAfterRemoveAssociation
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterRemoveAssociation(Object classPK,
String associationClassName, Object associationClassPK)
throws ModelListenerException {
// TODO Auto-generated method stub
}
示例13: onAfterUpdate
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterUpdate(Object model) throws ModelListenerException {
User user = (User) model;
_log.info("Executing code after update of user : "
+ user.getEmailAddress());
}
示例14: onBeforeAddAssociation
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onBeforeAddAssociation(Object classPK,
String associationClassName, Object associationClassPK)
throws ModelListenerException {
// TODO Auto-generated method stub
}
示例15: onBeforeRemoveAssociation
import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onBeforeRemoveAssociation(Object classPK,
String associationClassName, Object associationClassPK)
throws ModelListenerException {
// TODO Auto-generated method stub
}