本文整理了Java中org.jboss.seam.core.Events.exists()
方法的一些代码示例,展示了Events.exists()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Events.exists()
方法的具体详情如下:
包路径:org.jboss.seam.core.Events
类名称:Events
方法名:exists
暂无
代码示例来源:origin: org.jboss.seam/jboss-seam
public void setUsername(String username)
{
if (this.username != username && (this.username == null || !this.username.equals(username)))
{
this.username = username;
invalid = false;
if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void setPassword(String password)
{
if (this.password != password && (this.password == null || !this.password.equals(password)))
{
this.password = password;
invalid = false;
if (Events.exists()) Events.instance().raiseEvent(EVENT_CREDENTIALS_UPDATED);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
additions.remove(name);
removals.add(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
additions.remove(name);
removals.add(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Clears any roles added by calling addRole() while not authenticated.
* This method may be overridden by a subclass if different
* pre-authentication logic should occur.
*/
protected void preAuthenticate()
{
preAuthenticationRoles.clear();
if (Events.exists()) Events.instance().raiseEvent(EVENT_PRE_AUTHENTICATE);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
map.remove(name);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void set(String name, Object value)
{
// We can't raise a preSetVariable event for Events itself because it doesn't exist yet...
if ( !Seam.getComponentName(Events.class).equals(name) && Events.exists() )
{
Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
}
map.put(name, value);
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-contentview-jsf
protected void raiseEvent(String eventName, Object... params) {
if (Events.exists()) {
Events.instance().raiseEvent(eventName, params);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void set(String name, Object value)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
if (value==null)
{
//yes, we need this
remove(name);
}
else
{
removals.remove(name);
additions.put(name, value);
}
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void set(String name, Object value)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
getCurrentWritableMap().put( getKey(name), value );
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void remove(String name)
{
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
getCurrentWritableMap().remove( getKey(name) );
if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public String getUsername()
{
if (!isInitialized() && Events.exists())
{
setInitialized(true);
Events.instance().raiseEvent(EVENT_INIT_CREDENTIALS, this);
}
return username;
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Force the resource bundle to reload, using the current locale,
* and raise the org.jboss.seam.timeZoneSelected event
*/
public void select()
{
setCookieValueIfEnabled( getTimeZoneId() );
if ( Events.exists() )
{
Events.instance().raiseEvent( "org.jboss.seam.timeZoneSelected", getTimeZoneId() );
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Force the resource bundle to reload, using the current locale,
* and raise the org.jboss.seam.localeSelected event.
*/
public void select()
{
FacesContext.getCurrentInstance().getViewRoot().setLocale( getLocale() );
//Contexts.removeFromAllContexts("org.jboss.seam.core.resourceBundle");
Contexts.removeFromAllContexts("org.jboss.seam.international.messages");
setCookieValueIfEnabled( getLocaleString() );
if ( Events.exists() )
{
Events.instance().raiseEvent( "org.jboss.seam.localeSelected", getLocaleString() );
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Raise an event so that an observer may add a faces message when Seam-managed transactions fail.
*/
protected void raiseTransactionFailedEvent()
{
try
{
UserTransaction tx = Transaction.instance();
if ( tx.isRolledBackOrMarkedRollback() )
{
if (Events.exists()) Events.instance().raiseEvent(TRANSACTION_FAILED, tx.getStatus());
}
}
catch (Exception e) {} //swallow silently, not important
}
代码示例来源:origin: org.jboss.seam/jboss-seam
public void logout()
{
if (isLoggedIn())
{
unAuthenticate();
Session.instance().invalidate();
if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGGED_OUT);
}
}
代码示例来源:origin: org.picketlink/picketlink-seam
public void sendAuthenticationRequestToIDP(HttpServletRequest request, HttpServletResponse response,
SamlIdentityProvider samlIdentityProvider, String returnUrl)
{
AuthnRequestType authnRequest = samlMessageFactory.createAuthnRequest();
requests.addRequest(authnRequest.getID(), samlIdentityProvider, returnUrl);
if (Events.exists())
{
Events.instance().raiseEvent(Identity.EVENT_PRE_AUTHENTICATE);
}
samlMessageSender.sendRequestToIDP(request, response, samlIdentityProvider, SamlProfile.SINGLE_SIGN_ON,
authnRequest);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Promote a temporary conversation and make it long-running
*/
public void beginConversation()
{
if ( !isLongRunningConversation() )
{
log.debug("Beginning long-running conversation");
setLongRunningConversation(true);
createConversationEntry();
Conversation.instance(); //force instantiation of the Conversation in the outer (non-nested) conversation
storeConversationToViewRootIfNecessary();
if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_BEGIN);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
private ResolverChain createDefaultResolverChain()
{
ResolverChain chain = (ResolverChain) Contexts.getSessionContext().get(DEFAULT_RESOLVER_CHAIN);
if (chain == null)
{
chain = new ResolverChain();
for (String resolverName : Init.instance().getPermissionResolvers())
{
chain.getResolvers().add((PermissionResolver) Component.getInstance(resolverName, true));
}
Contexts.getSessionContext().set(DEFAULT_RESOLVER_CHAIN, chain);
if (Events.exists()) Events.instance().raiseEvent(DEFAULT_RESOLVER_CHAIN_CREATED, chain);
}
return chain;
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Make a long-running conversation temporary.
*/
public void endConversation(boolean beforeRedirect)
{
if ( isLongRunningConversation() )
{
log.debug("Ending long-running conversation");
if ( Events.exists() ) Events.instance().raiseEvent(EVENT_CONVERSATION_END);
setLongRunningConversation(false);
destroyBeforeRedirect = beforeRedirect;
endNestedConversations( getCurrentConversationId() );
storeConversationToViewRootIfNecessary();
}
unlockConversation();
}
内容来源于网络,如有侵权,请联系作者删除!