本文整理汇总了Java中org.jboss.seam.ScopeType类的典型用法代码示例。如果您正苦于以下问题:Java ScopeType类的具体用法?Java ScopeType怎么用?Java ScopeType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScopeType类属于org.jboss.seam包,在下文中一共展示了ScopeType类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initUmaMetadataConfiguration
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value ="umaMetadataConfiguration", scope=ScopeType.APPLICATION, autoCreate = true)
public UmaConfiguration initUmaMetadataConfiguration() throws OxIntializationException {
String umaConfigurationEndpoint = getUmaConfigurationEndpoint();
if (StringHelper.isEmpty(umaConfigurationEndpoint)) {
return null;
}
UmaConfigurationService metaDataConfigurationService = UmaClientFactory.instance().createMetaDataConfigurationService(umaConfigurationEndpoint);
UmaConfiguration metadataConfiguration = metaDataConfigurationService.getMetadataConfiguration();
if (metadataConfiguration == null) {
throw new OxIntializationException("UMA meta data configuration is invalid!");
}
return metadataConfiguration;
}
示例2: authenticate
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Transactional
public boolean authenticate()
{
// Tests that the SFSB can be obtained in both ContextualHttpRequests (authentication and web service invocation)
TestEjbLocal ejb = (TestEjbLocal) Component.getInstance("securedEjb", ScopeType.EVENT);
ejb.foo();
log.debug("Authenticating username/password: " + credentials.getUsername() + "/" + credentials.getPassword());
if (credentials.getUsername().equals(credentials.getPassword())) {
log.info("Authenticated {0}", credentials.getUsername());
if (credentials.getUsername().equals("admin")) {
identity.addRole("admin");
log.info("Admin rights granted for {0}", credentials.getUsername());
}
log.debug("Authentication valid");
return true;
} else {
log.debug("Authentication invalid");
return false;
}
}
示例3: createLdapEntryManager
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value = LDAP_ENTRY_MANAGER_NAME, scope = ScopeType.APPLICATION, autoCreate = true)
public LdapEntryManager createLdapEntryManager() {
LdapConnectionService connectionProvider = (LdapConnectionService) Contexts.getApplicationContext().get("connectionProvider");
LdapEntryManager ldapEntryManager = new LdapEntryManager(new OperationsFacade(connectionProvider));
log.debug("Created site LdapEntryManager: " + ldapEntryManager);
return ldapEntryManager;
}
示例4: createCentralLdapEntryManager
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value = LDAP_CENTRAL_ENTRY_MANAGER_NAME, scope = ScopeType.APPLICATION, autoCreate = true)
public LdapEntryManager createCentralLdapEntryManager() {
LdapConnectionService centralConnectionProvider = (LdapConnectionService) Contexts.getApplicationContext().get("centralConnectionProvider");
if (centralConnectionProvider == null) {
return null;
}
log.debug("Created central LdapEntryManager: " + centralConnectionProvider);
LdapEntryManager centralLdapEntryManager = new LdapEntryManager(new OperationsFacade(centralConnectionProvider));
log.debug("Created central LdapEntryManager: " + centralLdapEntryManager);
return centralLdapEntryManager;
}
示例5: createLdapAuthEntryManager
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value = "ldapAuthEntryManager", scope = ScopeType.APPLICATION, autoCreate = true)
public LdapEntryManager createLdapAuthEntryManager() {
LdapConnectionService connectionProvider = (LdapConnectionService) Contexts.getApplicationContext().get("authConnectionProvider");
LdapEntryManager ldapAuthEntryManager = new LdapEntryManager(new OperationsFacade(connectionProvider, null));
// LDAP_ENTRY_MANAGER_NAME.addDeleteSubscriber(new
// LdifArchiver(LDAP_ENTRY_MANAGER_NAME));
log.debug("Created site LdapAuthEntryManager: " + ldapAuthEntryManager);
return ldapAuthEntryManager;
}
示例6: createTransactionContext
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value="transactionContext",autoCreate=true,scope=ScopeType.APPLICATION)
public ThreadLocal<TransactionContext> createTransactionContext() {
return new ThreadLocal<TransactionContext>() {
@Override
protected TransactionContext initialValue() {
TransactionContext context = new TransactionContext();
log.debug("Starting transaction " + context.transactionId);
return context;
}
};
}
示例7: createQuizSession
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value = "quizSession", scope = ScopeType.EVENT)
public QuizSessionBean createQuizSession() {
return this;
}
示例8: getSearchPattern
import org.jboss.seam.ScopeType; //导入依赖的package包/类
@Factory(value="pattern", scope=ScopeType.EVENT)
public String getSearchPattern()
{
return searchString==null ?
"%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
}
示例9: getScopeTypes
import org.jboss.seam.ScopeType; //导入依赖的package包/类
/**
* Get all available scope types
*
* @return Array of scope types
*/
public org.xdi.oxauth.model.common.ScopeType[] getScopeTypes() {
return org.xdi.oxauth.model.common.ScopeType.values();
}