org.jboss.seam.annotations.Scope.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(187)

本文整理了Java中org.jboss.seam.annotations.Scope.<init>()方法的一些代码示例,展示了Scope.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scope.<init>()方法的具体详情如下:
包路径:org.jboss.seam.annotations.Scope
类名称:Scope
方法名:<init>

Scope.<init>介绍

暂无

代码示例

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core

  1. @Name("fileUploadHolderCycle")
  2. @Scope(ScopeType.PAGE)
  3. public class UploadItemHolderCycleManager implements Serializable {
  4. private static final long serialVersionUID = 1L;
  5. @Destroy
  6. public void destroy() {
  7. Contexts.getConversationContext().remove("fileUploadHolder");
  8. }
  9. }

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * Dummy component that lets us install the
  3. * EjbSynchronizations via the tag
  4. * transaction:ejb-transaction
  5. *
  6. * @see EjbSynchronizations
  7. * @author Gavin King
  8. *
  9. */
  10. @Name("org.jboss.seam.transaction.ejbTransaction")
  11. @Scope(ScopeType.STATELESS)
  12. @Install(precedence=BUILT_IN, value=false)
  13. @BypassInterceptors
  14. public class EjbTransaction {}

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. @Name("org.jboss.seam.core.ConversationIdGenerator")
  2. @Scope(ScopeType.APPLICATION)
  3. @Install(precedence=Install.BUILT_IN)
  4. public class ConversationIdGenerator
  5. {
  6. private static AtomicInteger uniqueId = new AtomicInteger(0);
  7. public String getNextId() {
  8. //TODO: this is not cluster safe!!!!!
  9. return Integer.toString(uniqueId.incrementAndGet());
  10. }
  11. public static ConversationIdGenerator instance() {
  12. ConversationIdGenerator instance =
  13. (ConversationIdGenerator) Component.getInstance("org.jboss.seam.core.ConversationIdGenerator");
  14. return (instance!=null) ? instance : new ConversationIdGenerator();
  15. }
  16. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

  1. @Name("currentDocumentCollection")
  2. @Scope(ScopeType.PAGE)
  3. @BypassInterceptors
  4. public class CurrentDocumentCollectionBean implements Serializable {

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. @Scope(ScopeType.EVENT)
  2. @BypassInterceptors
  3. @Install(false)
  4. public class ManagedTopicPublisher

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * A chain of permission resolvers. Specific permission checks are generally mapped to a
  3. * particular ResolverChain for resolution.
  4. *
  5. * @author Shane Bryzak
  6. */
  7. @Scope(SESSION)
  8. @BypassInterceptors
  9. public class ResolverChain implements Serializable
  10. {
  11. private List<PermissionResolver> resolvers = new ArrayList<PermissionResolver>();
  12. public List<PermissionResolver> getResolvers()
  13. {
  14. return resolvers;
  15. }
  16. public void setResolvers(List<PermissionResolver> resolvers)
  17. {
  18. this.resolvers = resolvers;
  19. }
  20. }

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. @Scope(ScopeType.STATELESS)
  2. @Name("org.jboss.seam.async.asynchronousExceptionHandler")
  3. @Install(precedence=BUILT_IN)
  4. @BypassInterceptors
  5. public class AsynchronousExceptionHandler
  6. {
  7. private LogProvider log = Logging.getLogProvider(AsynchronousExceptionHandler.class);
  8. public void handleException(Exception throwable)
  9. {
  10. log.error("Exception thrown whilst executing asynchronous call", throwable);
  11. }
  12. public static AsynchronousExceptionHandler instance()
  13. {
  14. return (AsynchronousExceptionHandler) Component.getInstance(AsynchronousExceptionHandler.class);
  15. }
  16. }

代码示例来源:origin: opentoutatice-ecm.collab-tools/opentoutatice-collab-tools-ecm

  1. /**
  2. * @author David Chevrier.
  3. *
  4. */
  5. @Name("webActions")
  6. @Scope(ScopeType.CONVERSATION)
  7. @Install(precedence = ExtendedSeamPrecedence.ADD_ON)
  8. public class ToutaticeCTWebActionsBean extends ToutaticeWebActionsBean {
  9. private static final long serialVersionUID = -6124671913159928250L;
  10. @Override
  11. public boolean isInPortalViewContext() {
  12. WidgetsAdapterService widgetsAdapterService = Framework.getLocalService(WidgetsAdapterService.class);
  13. widgetsAdapterService.addPortalViewsIds("send_notification_email", "document_notif_email", "confirm_mail_sending", "mail_sending");
  14. return widgetsAdapterService.isInPortalViewContext();
  15. }
  16. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth

  1. @Name("oauthServerKeyActions")
  2. @Scope(ScopeType.EVENT)
  3. public class ServerKeyActionBean {
  4. public String getPublicCertificate() {
  5. OAuthServerKeyManager skm = Framework.getService(OAuthServerKeyManager.class);
  6. return skm.getPublicKeyCertificate();
  7. }
  8. public String getKeyName() {
  9. OAuthServerKeyManager skm = Framework.getService(OAuthServerKeyManager.class);
  10. return skm.getKeyName();
  11. }
  12. }

代码示例来源:origin: org.picketlink/picketlink-seam

  1. /**
  2. * @author Marcel Kolsteren
  3. * @since Jan 30, 2010
  4. */
  5. @Name("org.picketlink.identity.seam.federation.openIdConsumerManager")
  6. @Scope(ScopeType.APPLICATION)
  7. @BypassInterceptors
  8. @Startup
  9. public class OpenIdConsumerManagerFactory
  10. {
  11. private ConsumerManager consumerManager;
  12. @Unwrap
  13. public ConsumerManager getConsumerManager()
  14. {
  15. return consumerManager;
  16. }
  17. @Create
  18. public void startup(Component component) throws Exception
  19. {
  20. consumerManager = new ConsumerManager();
  21. }
  22. }

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * Support for injecting the JSF FacesContext object
  3. *
  4. * @author Gavin King
  5. */
  6. @Scope(ScopeType.APPLICATION)
  7. @BypassInterceptors
  8. @Name("org.jboss.seam.faces.facesContext")
  9. @Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
  10. public class FacesContext
  11. {
  12. @Unwrap
  13. public javax.faces.context.FacesContext getContext()
  14. {
  15. return javax.faces.context.FacesContext.getCurrentInstance();
  16. }
  17. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

  1. /**
  2. * Externalize serverLocation Factory to avoid NavigationContext reentrant calls
  3. *
  4. * @author Thierry Delprat
  5. */
  6. @Name("serverLocator")
  7. @Scope(CONVERSATION)
  8. @Install(precedence = FRAMEWORK)
  9. public class ServerContextBean implements Serializable {
  10. private static final long serialVersionUID = 1L;
  11. private RepositoryLocation currentServerLocation;
  12. @Factory(value = "currentServerLocation", scope = EVENT)
  13. public RepositoryLocation getCurrentServerLocation() {
  14. return currentServerLocation;
  15. }
  16. public void setRepositoryLocation(RepositoryLocation serverLocation) {
  17. this.currentServerLocation = serverLocation;
  18. }
  19. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth

  1. @Name("oauthServiceProvidersActions")
  2. @Scope(ScopeType.CONVERSATION)
  3. public class OAuthServiceProvidersActionBean extends DirectoryBasedEditor {
  4. private static final long serialVersionUID = 1L;
  5. protected static final String DIRECTORY = OAuthServiceProviderRegistryImpl.DIRECTORY_NAME;
  6. protected static final String SCHEMA = NuxeoOAuthServiceProvider.SCHEMA;
  7. @Override
  8. protected String getDirectoryName() {
  9. return DIRECTORY;
  10. }
  11. @Override
  12. protected String getSchemaName() {
  13. return SCHEMA;
  14. }
  15. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

  1. @Name("nxHotReloadResourceBundleControl")
  2. @BypassInterceptors
  3. @Scope(ScopeType.SESSION)
  4. @AutoCreate
  5. public class HotReloadResourceBundleControl extends ResourceBundle.Control implements Serializable {

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * Manager component for the current locale that is
  3. * aware of the selected locale
  4. *
  5. * @author Gavin King
  6. */
  7. @Scope(ScopeType.STATELESS)
  8. @Name("org.jboss.seam.core.locale")
  9. @Install(precedence=FRAMEWORK, dependencies="org.jboss.seam.international.localeSelector")
  10. @BypassInterceptors
  11. public class Locale extends org.jboss.seam.core.Locale
  12. {
  13. @Unwrap @Override
  14. public java.util.Locale getLocale()
  15. {
  16. return Contexts.isSessionContextActive() ?
  17. LocaleSelector.instance().getLocale() :
  18. super.getLocale();
  19. }
  20. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

  1. @Name("treeInvalidator")
  2. @Scope(SESSION)
  3. @Install(precedence = Install.FRAMEWORK)
  4. public class TreeInvalidatorBean implements Serializable {

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth

  1. @Name("oauthConsumersActions")
  2. @Scope(ScopeType.CONVERSATION)
  3. public class OAuthConsumersActionBean extends DirectoryBasedEditor {
  4. private static final long serialVersionUID = 1L;
  5. protected static final String DIRECTORY = OAuthConsumerRegistryImpl.DIRECTORY_NAME;
  6. protected static final String SCHEMA = NuxeoOAuthConsumer.SCHEMA;
  7. @Override
  8. protected String getDirectoryName() {
  9. return DIRECTORY;
  10. }
  11. @Override
  12. protected String getSchemaName() {
  13. return SCHEMA;
  14. }
  15. }

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * Manager component for the current locale that is
  3. * aware of the HTTP request locale
  4. *
  5. * @author Gavin King
  6. */
  7. @Scope(ScopeType.STATELESS)
  8. @Name("org.jboss.seam.core.locale")
  9. @Install(precedence=FRAMEWORK-1)
  10. @BypassInterceptors
  11. public class Locale extends org.jboss.seam.core.Locale
  12. {
  13. @Unwrap @Override
  14. public java.util.Locale getLocale()
  15. {
  16. ServletContexts servletContexts = ServletContexts.getInstance();
  17. ServletRequest request = servletContexts==null ? null : servletContexts.getRequest();
  18. return request==null ? super.getLocale() : request.getLocale();
  19. }
  20. }

代码示例来源:origin: org.jboss.seam/jboss-seam

  1. /**
  2. * Support for the pooled task list.
  3. *
  4. * @see TaskInstanceList
  5. * @author Gavin King
  6. */
  7. @Name("org.jboss.seam.bpm.pooledTaskInstanceList")
  8. @Scope(ScopeType.APPLICATION)
  9. @Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
  10. public class PooledTaskInstanceList
  11. {
  12. @Unwrap
  13. @Transactional
  14. public List<TaskInstance> getPooledTaskInstanceList()
  15. {
  16. Actor actor = Actor.instance();
  17. String actorId = actor.getId();
  18. if ( actorId == null ) return null;
  19. ArrayList groupIds = new ArrayList( actor.getGroupActorIds() );
  20. groupIds.add(actorId);
  21. return ManagedJbpmContext.instance().getGroupTaskList(groupIds);
  22. }
  23. }

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-admin-center-oauth

  1. @Name("oauthConsumersTokensActions")
  2. @Scope(ScopeType.CONVERSATION)
  3. public class OAuthConsumersTokensActionBean extends DirectoryBasedEditor {
  4. private static final long serialVersionUID = 1L;
  5. @Override
  6. protected Map<String, Serializable> getQueryFilter() {
  7. Map<String, Serializable> filter = new HashMap<String, Serializable>();
  8. filter.put("clientToken", 0);
  9. return filter;
  10. }
  11. @Override
  12. protected String getDirectoryName() {
  13. return OAuthTokenStoreImpl.DIRECTORY_NAME;
  14. }
  15. @Override
  16. protected String getSchemaName() {
  17. return NuxeoOAuthToken.SCHEMA;
  18. }
  19. }

相关文章

Scope类方法