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

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

本文整理了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

@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

/**
 * Dummy component that lets us install the
 * EjbSynchronizations via the tag
 * transaction:ejb-transaction
 *
 * @see EjbSynchronizations
 * @author Gavin King
 * 
 */
@Name("org.jboss.seam.transaction.ejbTransaction")
@Scope(ScopeType.STATELESS)
@Install(precedence=BUILT_IN, value=false)
@BypassInterceptors
public class EjbTransaction {}

代码示例来源: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-base

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

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

@Scope(ScopeType.EVENT)
@BypassInterceptors
@Install(false)
public class ManagedTopicPublisher

代码示例来源: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.jboss.seam/jboss-seam

@Scope(ScopeType.STATELESS)
@Name("org.jboss.seam.async.asynchronousExceptionHandler")
@Install(precedence=BUILT_IN)
@BypassInterceptors
public class AsynchronousExceptionHandler
{

  private LogProvider log = Logging.getLogProvider(AsynchronousExceptionHandler.class);
    public void handleException(Exception throwable)
  {
   log.error("Exception thrown whilst executing asynchronous call", throwable);
  }
    public static AsynchronousExceptionHandler instance()
  {
   return (AsynchronousExceptionHandler) Component.getInstance(AsynchronousExceptionHandler.class);
  }
  }

代码示例来源: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-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.picketlink/picketlink-seam

/**
* @author Marcel Kolsteren
* @since Jan 30, 2010
*/
@Name("org.picketlink.identity.seam.federation.openIdConsumerManager")
@Scope(ScopeType.APPLICATION)
@BypassInterceptors
@Startup
public class OpenIdConsumerManagerFactory
{
  private ConsumerManager consumerManager;

  @Unwrap
  public ConsumerManager getConsumerManager()
  {
   return consumerManager;
  }

  @Create
  public void startup(Component component) throws Exception
  {
   consumerManager = new ConsumerManager();
  }
}

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

/**
 * Support for injecting the JSF FacesContext object
 * 
 * @author Gavin King
 */
@Scope(ScopeType.APPLICATION)
@BypassInterceptors
@Name("org.jboss.seam.faces.facesContext")
@Install(precedence=BUILT_IN, classDependencies="javax.faces.context.FacesContext")
public class FacesContext
{
  @Unwrap
  public javax.faces.context.FacesContext getContext()
  {
   return javax.faces.context.FacesContext.getCurrentInstance();
  }
}

代码示例来源: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;
  }
}

代码示例来源: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-platform-webapp-base

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

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

/**
 * Manager component for the current locale that is
 * aware of the selected locale
 * 
 * @author Gavin King
 */
@Scope(ScopeType.STATELESS)
@Name("org.jboss.seam.core.locale")
@Install(precedence=FRAMEWORK, dependencies="org.jboss.seam.international.localeSelector")
@BypassInterceptors
public class Locale extends org.jboss.seam.core.Locale
{

  @Unwrap @Override
  public java.util.Locale getLocale()
  {
   return Contexts.isSessionContextActive() ?
      LocaleSelector.instance().getLocale() :
      super.getLocale();
  }
  }

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

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

代码示例来源: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.jboss.seam/jboss-seam

/**
 * Manager component for the current locale that is
 * aware of the HTTP request locale
 * 
 * @author Gavin King
 */
@Scope(ScopeType.STATELESS)
@Name("org.jboss.seam.core.locale")
@Install(precedence=FRAMEWORK-1)
@BypassInterceptors
public class Locale extends org.jboss.seam.core.Locale
{

  @Unwrap @Override
  public java.util.Locale getLocale()
  {
   ServletContexts servletContexts = ServletContexts.getInstance();
   ServletRequest request = servletContexts==null ? null : servletContexts.getRequest();
   return request==null ? super.getLocale() : request.getLocale();
  }
  }

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

/**
 * Support for the pooled task list.
 * 
 * @see TaskInstanceList
 * @author Gavin King
 */
@Name("org.jboss.seam.bpm.pooledTaskInstanceList")
@Scope(ScopeType.APPLICATION)
@Install(precedence=BUILT_IN, dependencies="org.jboss.seam.bpm.jbpm")
public class PooledTaskInstanceList
{
    @Unwrap
  @Transactional
  public List<TaskInstance> getPooledTaskInstanceList()
  {
   Actor actor = Actor.instance();
   String actorId = actor.getId();
   if ( actorId == null ) return null;
   ArrayList groupIds = new ArrayList( actor.getGroupActorIds() );
   groupIds.add(actorId);
   return ManagedJbpmContext.instance().getGroupTaskList(groupIds);
  }
  }

代码示例来源: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;
  }

}

相关文章

Scope类方法