本文整理了Java中org.esupportail.commons.utils.Assert
类的一些代码示例,展示了Assert
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert
类的具体详情如下:
包路径:org.esupportail.commons.utils.Assert
类名称:Assert
暂无
代码示例来源:origin: org.esupportail/example-web-jsf-shared
/**
* @see org.esupportail.example.web.controllers.AbstractDomainAwareBean#afterPropertiesSetInternal()
*/
@Override
public void afterPropertiesSetInternal() {
Assert.notNull(this.sessionController, "property sessionController of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-hibernate
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
if (jdbcUpgradeSessionFactoryBeanName == null && jndiUpgradeSessionFactoryBeanName == null) {
throw new ConfigException("properties [jdbcUpgradeSessionFactoryBeanName] "
+ "and [jndiUpgradeSessionFactoryBeanName] of class ["
+ getClass().getName() + "] can not be both null");
}
Assert.hasText(createSessionFactoryBeanName,
"property [createSessionFactoryBeanName] of class ["
+ getClass().getName() + "] can not be null");
}
代码示例来源:origin: org.esupportail/example-web-jsf-shared
/**
* JSF callback.
* @return a String.
* @throws IOException
*/
public String logout() throws IOException {
if (ContextUtils.isPortlet()) {
throw new UnsupportedOperationException("logout() should not be called in portlet mode.");
}
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
String returnUrl = request.getRequestURL().toString().replaceFirst("/stylesheets/[^/]*$", "");
String forwardUrl;
Assert.hasText(
casLogoutUrl,
"property casLogoutUrl of class " + getClass().getName() + " is null");
forwardUrl = String.format(casLogoutUrl, StringUtils.utf8UrlEncode(returnUrl));
// note: the session beans will be kept even when invalidating
// the session so they have to be reset (by the exception controller).
// We invalidate the session however for the other attributes.
request.getSession().invalidate();
request.getSession(true);
// calling this method will reset all the beans of the application
exceptionController.restart();
externalContext.redirect(forwardUrl);
facesContext.responseComplete();
return null;
}
代码示例来源:origin: org.esupportail/ects-web-jsf-shared
/**
* @see org.esupportail.ects.web.controllers.AbstractDomainAwareBean#afterPropertiesSetInternal()
*/
@Override
public void afterPropertiesSetInternal() {
Assert.notNull(this.exceptionController, "property exceptionController of class "
+ this.getClass().getName() + " can not be null");
Assert.notNull(this.authenticator, "property authenticator of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/ects-web-jsf-shared
/**
* JSF callback.
* @return a String.
* @throws IOException
*/
public String logout() throws IOException {
if (ContextUtils.isPortlet()) {
throw new UnsupportedOperationException("logout() should not be called in portlet mode.");
}
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
String returnUrl = request.getRequestURL().toString().replaceFirst("/stylesheets/[^/]*$", "");
String forwardUrl;
Assert.hasText(
casLogoutUrl,
"property casLogoutUrl of class " + getClass().getName() + " is null");
forwardUrl = String.format(casLogoutUrl, StringUtils.utf8UrlEncode(returnUrl));
// note: the session beans will be kept even when invalidating
// the session so they have to be reset (by the exception controller).
// We invalidate the session however for the other attributes.
request.getSession().invalidate();
request.getSession(true);
// calling this method will reset all the beans of the application
exceptionController.restart();
externalContext.redirect(forwardUrl);
facesContext.responseComplete();
return null;
}
代码示例来源:origin: org.esupportail/esup-commons2-web
@Override
public void afterPropertiesSet() {
Assert.notNull(applicationService, "property applicationService of class "
+ this.getClass().getName()
+ " can not be null.");
//TODO CL V2 : Use Authentication is core module
// Assert.notNull(authenticationService, "property authenticationService of class "
// + this.getClass().getName()
// + " can not be null.");
}
代码示例来源:origin: org.esupportail/example-domain-services
/**
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
public void afterPropertiesSet() {
Assert.notNull(authenticationService,
"property authenticationService of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-ecm-dashboard-domain-services
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(authenticationService, "property authenticationService of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-dao
@Override
public void afterPropertiesSet() {
Assert.notNull(this.domainService,
"property domainService of class " + this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-hibernate
@Override
public void afterPropertiesSet() {
Assert.notNull(databaseManagers,
"property [databaseManagers] of class ["
+ getClass().getName() + "] can not be null");
}
代码示例来源:origin: org.esupportail/example-web-jsf-shared
/**
* @see org.esupportail.example.web.controllers.AbstractDomainAwareBean#afterPropertiesSetInternal()
*/
@Override
public void afterPropertiesSetInternal() {
Assert.notNull(this.exceptionController, "property exceptionController of class "
+ this.getClass().getName() + " can not be null");
Assert.notNull(this.authenticator, "property authenticator of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-hibernate
@Override
public void initDao() {
Assert.notNull(hibernateTemplate,
"property hibernateTemplate of class " + getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/ects-web-jsf-shared
/**
* @see org.esupportail.ects.web.controllers.AbstractDomainAwareBean#afterPropertiesSetInternal()
*/
@Override
public void afterPropertiesSetInternal() {
Assert.notNull(this.sessionController, "property sessionController of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/ects-domain-services
/**
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
public void afterPropertiesSet() {
Assert.notNull(authenticationService,
"property authenticationService of class "
+ this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-hibernate
@Override
public void afterPropertiesSet() {
Assert.notNull(this.daoService,
"property daoService of class " + this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/esup-commons2-web
@Override
public void afterPropertiesSet() {
Assert.notNull(this.i18nService,
"property i18nService of class " + this.getClass().getName()
+ " can not be null");
if (timezone == null) {
timezone = TimeZone.getDefault().getDisplayName();
}
}
代码示例来源:origin: org.esupportail/esup-opi-web-beans
/**
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(this.parameterService, "property parameterService of class "
+ this.getClass().getName() + " can not be null");
Assert.notNull(this.domainService, "property domainService of class "
+ this.getClass().getName() + " can not be null");
Assert.notNull(this.i18Service, "property i18Service of class "
+ this.getClass().getName() + " can not be null");
reset();
}
代码示例来源:origin: org.esupportail/esup-commons2-web
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
Assert.notNull(this.applicationService,
"property applicationService of class " + this.getClass().getName()
+ " can not be null");
}
代码示例来源:origin: org.esupportail/example-domain-services
/**
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
public void afterPropertiesSet() throws Exception {
logger.debug("in afterPropertiesSet");
Assert.notNull(this.daoService,
"property daoService of class " + this.getClass().getName() + " can not be null");
}
代码示例来源:origin: org.esupportail/example-domain-services
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
Assert.notNull(this.domainService,
"property domainService of class " + this.getClass().getName()
+ " can not be null");
}
内容来源于网络,如有侵权,请联系作者删除!