当前位置: 首页>>代码示例>>Java>>正文


Java ModelListenerException类代码示例

本文整理汇总了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);
        }
    }
 
开发者ID:wbstr,项目名称:liferay-newsletter,代码行数:20,代码来源:WcsRegistrationAction.java

示例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();
	}
}
 
开发者ID:nhpatt,项目名称:ScreensDemos,代码行数:11,代码来源:DDLRecordModelListener.java

示例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();
	}
}
 
开发者ID:nhpatt,项目名称:ScreensDemos,代码行数:11,代码来源:DDLRecordModelListener.java

示例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");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:8,代码来源:AbstractInnerModelListener.java

示例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");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:8,代码来源:AbstractInnerModelListener.java

示例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");
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:8,代码来源:AbstractInnerModelListener.java

示例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);
	}
}
 
开发者ID:slemarchand,项目名称:gamification-portlet,代码行数:15,代码来源:SocialActivityListener.java

示例8: onAfterRemove

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterRemove(JournalArticle article) throws ModelListenerException {
    logChange(article);
    super.onAfterRemove(article);
}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:6,代码来源:WebContentListener.java

示例9: onAfterUpdate

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
@Override
public void onAfterUpdate(JournalArticle article) throws ModelListenerException {
    logChange(article);
    super.onAfterUpdate(article);
}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:6,代码来源:WebContentListener.java

示例10: onAfterAddAssociation

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterAddAssociation(Object classPK,
		String associationClassName, Object associationClassPK)
		throws ModelListenerException {
	// TODO Auto-generated method stub

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java

示例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());

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java

示例12: onAfterRemoveAssociation

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onAfterRemoveAssociation(Object classPK,
		String associationClassName, Object associationClassPK)
		throws ModelListenerException {
	// TODO Auto-generated method stub

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java

示例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());

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java

示例14: onBeforeAddAssociation

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onBeforeAddAssociation(Object classPK,
		String associationClassName, Object associationClassPK)
		throws ModelListenerException {
	// TODO Auto-generated method stub

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java

示例15: onBeforeRemoveAssociation

import com.liferay.portal.ModelListenerException; //导入依赖的package包/类
public void onBeforeRemoveAssociation(Object classPK,
		String associationClassName, Object associationClassPK)
		throws ModelListenerException {
	// TODO Auto-generated method stub

}
 
开发者ID:mimacom,项目名称:maven-liferay-plugin,代码行数:7,代码来源:UserModelListener.java


注:本文中的com.liferay.portal.ModelListenerException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。