本文整理了Java中org.jboss.seam.annotations.Scope
类的一些代码示例,展示了Scope
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scope
类的具体详情如下:
包路径:org.jboss.seam.annotations.Scope
类名称:Scope
暂无
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
@Name("fileUploadHolderCycle")
@Scope(ScopeType.PAGE)
public class UploadItemHolderCycleManager implements Serializable {
private static final long serialVersionUID = 1L;
@Destroy
public void destroy() {
Contexts.getConversationContext().remove("fileUploadHolder");
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* Get the default scope
* @see Scope
*/
public static ScopeType getComponentScope(Class<?> clazz)
{
return clazz.isAnnotationPresent(Scope.class) ?
clazz.getAnnotation(Scope.class).value() :
getComponentType(clazz).getDefaultScope();
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauthServerKeyActions")
@Scope(ScopeType.EVENT)
public class ServerKeyActionBean {
public String getPublicCertificate() {
OAuthServerKeyManager skm = Framework.getService(OAuthServerKeyManager.class);
return skm.getPublicKeyCertificate();
}
public String getKeyName() {
OAuthServerKeyManager skm = Framework.getService(OAuthServerKeyManager.class);
return skm.getKeyName();
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauthServiceProvidersActions")
@Scope(ScopeType.CONVERSATION)
public class OAuthServiceProvidersActionBean extends DirectoryBasedEditor {
private static final long serialVersionUID = 1L;
protected static final String DIRECTORY = OAuthServiceProviderRegistryImpl.DIRECTORY_NAME;
protected static final String SCHEMA = NuxeoOAuthServiceProvider.SCHEMA;
@Override
protected String getDirectoryName() {
return DIRECTORY;
}
@Override
protected String getSchemaName() {
return SCHEMA;
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauthConsumersActions")
@Scope(ScopeType.CONVERSATION)
public class OAuthConsumersActionBean extends DirectoryBasedEditor {
private static final long serialVersionUID = 1L;
protected static final String DIRECTORY = OAuthConsumerRegistryImpl.DIRECTORY_NAME;
protected static final String SCHEMA = NuxeoOAuthConsumer.SCHEMA;
@Override
protected String getDirectoryName() {
return DIRECTORY;
}
@Override
protected String getSchemaName() {
return SCHEMA;
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauthConsumersTokensActions")
@Scope(ScopeType.CONVERSATION)
public class OAuthConsumersTokensActionBean extends DirectoryBasedEditor {
private static final long serialVersionUID = 1L;
@Override
protected Map<String, Serializable> getQueryFilter() {
Map<String, Serializable> filter = new HashMap<String, Serializable>();
filter.put("clientToken", 0);
return filter;
}
@Override
protected String getDirectoryName() {
return OAuthTokenStoreImpl.DIRECTORY_NAME;
}
@Override
protected String getSchemaName() {
return NuxeoOAuthToken.SCHEMA;
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
/**
* A chain of permission resolvers. Specific permission checks are generally mapped to a
* particular ResolverChain for resolution.
*
* @author Shane Bryzak
*/
@Scope(SESSION)
@BypassInterceptors
public class ResolverChain implements Serializable
{
private List<PermissionResolver> resolvers = new ArrayList<PermissionResolver>();
public List<PermissionResolver> getResolvers()
{
return resolvers;
}
public void setResolvers(List<PermissionResolver> resolvers)
{
this.resolvers = resolvers;
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
@Name("conversationTrashManager")
@Scope(APPLICATION)
public class ConversationTrashManager implements Serializable {
private static final long serialVersionUID = 9876098763432L;
private static final Log log = LogFactory.getLog(ConversationTrashManager.class);
private static TrashManagementService trashService;
public void initTrashManager() {
log.debug("Initialize");
}
public static boolean isTrashManagementEnabled() {
return getService().isTrashManagementEnabled();
}
protected static TrashManagementService getService() {
if (trashService == null) {
trashService = (TrashManagementService) Framework.getRuntime().getComponent(TrashManagementService.NAME);
}
return trashService;
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam-remoting
@Name("org.jboss.seam.remoting.messaging.SubscriptionRegistry.userTokens")
@Scope(ScopeType.SESSION)
public class UserTokens implements Serializable
{
Set<String> tokens = Collections.synchronizedSet(new HashSet<String>());
public void add(String token) {
tokens.add(token);
}
public boolean contains(String token) {
return tokens.contains(token);
}
public void remove(String token) {
tokens.remove(token);
}
@Destroy
public void cleanUp() {
SubscriptionRegistry.instance().cleanupTokens(tokens);
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauthProvidersTokensActions")
@Scope(ScopeType.CONVERSATION)
public class OAuthProvidersTokensActionBean extends DirectoryBasedEditor {
private static final long serialVersionUID = 1L;
@Override
protected Map<String, Serializable> getQueryFilter() {
Map<String, Serializable> filter = new HashMap<String, Serializable>();
filter.put("clientToken", 1);
return filter;
}
@Override
protected String getDirectoryName() {
return OAuthTokenStoreImpl.DIRECTORY_NAME;
}
@Override
protected String getSchemaName() {
return NuxeoOAuthToken.SCHEMA;
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
/**
* Seam Bean to expose Administrator Message to the JSF Web Layer. (base on {@link AdministrativeStatusManager}
*
* @author tiry
*/
@Name("adminMessageManager")
@Scope(ScopeType.APPLICATION)
public class AdminMessageActionBean implements Serializable {
private static final long serialVersionUID = 1L;
@Factory(value = "adminMessageActivated", scope = ScopeType.EVENT)
public boolean isAdminMessageActivated() {
return AdminStatusHelper.isAdminMessageActivated();
}
@Factory(value = "adminMessage", scope = ScopeType.EVENT)
public String getAdminMessage() {
return AdminStatusHelper.getAdminMessage();
}
@Factory(value = "adminMessageModificationDate", scope = ScopeType.EVENT)
public Calendar getAdminMessageModificationDate() {
return AdminStatusHelper.getAdminMessageModificationDate();
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
@Scope(ScopeType.EVENT)
public class DndConfigurationHelper {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauth2ProvidersTokensActions")
@Scope(ScopeType.CONVERSATION)
public class OAuth2ProvidersTokensActionBean extends DirectoryBasedEditor {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-comment-web
@Scope(CONVERSATION)
public class CommentManagerActionsBean extends AbstractCommentManagerActionsBean implements Serializable {
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth
@Name("oauth2ServiceProvidersActions")
@Scope(ScopeType.CONVERSATION)
public class OAuth2ServiceProvidersActionBean extends DirectoryBasedEditor {
代码示例来源:origin: org.jboss.seam/jboss-seam
@Name("org.jboss.seam.el.referenceCache")
@Scope(ScopeType.APPLICATION)
@Startup
public class JBossELReferenceCache {
@Create
public void start() {
ReflectionUtil.startup();
}
@Destroy
public void stop() {
ReflectionUtil.shutdown();
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam
@Name("org.jboss.seam.core.ConversationIdGenerator")
@Scope(ScopeType.APPLICATION)
@Install(precedence=Install.BUILT_IN)
public class ConversationIdGenerator
{
private static AtomicInteger uniqueId = new AtomicInteger(0);
public String getNextId() {
//TODO: this is not cluster safe!!!!!
return Integer.toString(uniqueId.incrementAndGet());
}
public static ConversationIdGenerator instance() {
ConversationIdGenerator instance =
(ConversationIdGenerator) Component.getInstance("org.jboss.seam.core.ConversationIdGenerator");
return (instance!=null) ? instance : new ConversationIdGenerator();
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
@Name("trashManager")
@Scope(APPLICATION)
public class TrashManagerBean implements TrashManager {
@In(create = true)
ConversationTrashManager conversationTrashManager;
@Override
public void destroy() {
}
@Override
public void initTrashManager() {
}
@Override
public boolean isTrashManagementEnabled() {
return ConversationTrashManager.isTrashManagementEnabled();
}
}
代码示例来源:origin: opentoutatice-ecm.collab-tools/opentoutatice-collab-tools-ecm
/**
* @author David Chevrier.
*
*/
@Name("webActions")
@Scope(ScopeType.CONVERSATION)
@Install(precedence = ExtendedSeamPrecedence.ADD_ON)
public class ToutaticeCTWebActionsBean extends ToutaticeWebActionsBean {
private static final long serialVersionUID = -6124671913159928250L;
@Override
public boolean isInPortalViewContext() {
WidgetsAdapterService widgetsAdapterService = Framework.getLocalService(WidgetsAdapterService.class);
widgetsAdapterService.addPortalViewsIds("send_notification_email", "document_notif_email", "confirm_mail_sending", "mail_sending");
return widgetsAdapterService.isInPortalViewContext();
}
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
/**
* Externalize serverLocation Factory to avoid NavigationContext reentrant calls
*
* @author Thierry Delprat
*/
@Name("serverLocator")
@Scope(CONVERSATION)
@Install(precedence = FRAMEWORK)
public class ServerContextBean implements Serializable {
private static final long serialVersionUID = 1L;
private RepositoryLocation currentServerLocation;
@Factory(value = "currentServerLocation", scope = EVENT)
public RepositoryLocation getCurrentServerLocation() {
return currentServerLocation;
}
public void setRepositoryLocation(RepositoryLocation serverLocation) {
this.currentServerLocation = serverLocation;
}
}
内容来源于网络,如有侵权,请联系作者删除!