Package org.ejbca.core.model.util

Examples of org.ejbca.core.model.util.EjbLocalHelper


    // Public methods
    public void initialize(HttpServletRequest request)
        throws Exception {
        if (!initialized) {
          administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, request.getRemoteAddr());
          ejb = new EjbLocalHelper();
            initialized = true;
        }
    }
View Full Code Here


     * @param request is a reference to the http request.
     */ 
    public void initialize(HttpServletRequest request, EjbcaWebBean ejbcawebbean) throws  Exception{
      if(!initialized){
        admin = ejbcawebbean.getAdminObject();
        EjbLocalHelper ejb = new EjbLocalHelper();
        logSession = ejb.getLogSession();
        logConfigurationSession = ejb.getLogConfigurationSession();
        certificatesession = ejb.getCertificateStoreSession();
        this.informationmemory = ejbcawebbean.getInformationMemory();
        initializeEventNameTables(ejbcawebbean);
        dnproxy = new SubjectDNProxy(admin, certificatesession);          
        Map<Integer,String> caidtonamemap = ejbcawebbean.getInformationMemory().getCAIdToNameMap();
        // Add Internal CA Name if it doesn't exists
View Full Code Here

    private static final InternalResources INTRES = InternalResources.getInstance();
    private static EjbLocalHelper ejb = null;
 
  private static synchronized EjbLocalHelper getEjb() {
    if (ejb == null) {
      ejb = new EjbLocalHelper();
    }
    return ejb;
  }
View Full Code Here

    } catch (Exception e) {
      log.error("Error initializing bean: ", e);
    }
    try {
      administrator = webBean.getAdminObject();
      EjbLocalHelper ejb = new EjbLocalHelper();
      certificatesession = ejb.getCertificateStoreSession();
      caadminsession = ejb.getCaAdminSession();
      caSession = ejb.getCaSession();
      authorizationsession = ejb.getAuthorizationSession();
      adminsession = ejb.getUserAdminSession();
      globalconfigurationsession = ejb.getGlobalConfigurationSession();
      certificateProfileSession = ejb.getCertificateProfileSession();
      endEntityProfileSession = ejb.getEndEntityProfileSession();
      crlCreateSession = ejb.getCrlCreateSession();
      this.informationmemory = webBean.getInformationMemory();

      new CertificateProfileDataHandler(administrator, authorizationsession, caSession, certificateProfileSession, informationmemory);
      cadatahandler = new CADataHandler(administrator, caadminsession, ejb.getCaSession(), endEntityProfileSession, adminsession, globalconfigurationsession, certificatesession, certificateProfileSession, crlCreateSession, authorizationsession, webBean);
      caInfoList = new ArrayList<CAWrapper>();
      initializeWrappers();
    } catch (Exception e){
      log.error("Error initializing bean: ", e);
    }
View Full Code Here

     * @param request is a reference to the http request.
     */
    public void initialize(HttpServletRequest request, EjbcaWebBean ejbcawebbean) throws  Exception{
      if(!initialized){
        admin = ejbcawebbean.getAdminObject();
        EjbLocalHelper ejb = new EjbLocalHelper();   
        hardtokensession = ejb.getHardTokenSession();
        hardtokenbatchsession = ejb.getHardTokenBatchJobSession();
        AuthorizationSession authorizationsession = ejb.getAuthorizationSession();
        UserAdminSession useradminsession = ejb.getUserAdminSession();
        CertificateProfileSession certificateProfileSession = ejb.getCertificateProfileSession();
        keyrecoverysession = ejb.getKeyRecoverySession();
        initialized=true;
        this.informationmemory = ejbcawebbean.getInformationMemory();
        this.hardtokenprofiledatahandler = new HardTokenProfileDataHandler(admin, hardtokensession, certificateProfileSession, authorizationsession , useradminsession, ejb.getCaSession(), informationmemory);
      }
    }
View Full Code Here

  private RaAdminSession raadminsession;
  private Admin administrator;

  /** Creates a new instance of AdminPreferences */
  public AdminPreferenceDataHandler(Admin administrator) {
    raadminsession = new EjbLocalHelper().getRaAdminSession();
    this.administrator = administrator;
  }
View Full Code Here

    }         
    if (ret!=null && StringUtils.isNotEmpty(signingCA)) {
      try {
        final int caid = Integer.parseInt(signingCA);
        final CmsCAServiceRequest request = new CmsCAServiceRequest(ret, CmsCAServiceRequest.MODE_SIGN);
        final CAAdminSession caAdminSession = new EjbLocalHelper().getCaAdminSession();
        final CmsCAServiceResponse resp = (CmsCAServiceResponse) caAdminSession.extendedService(admin, caid, request);
        ret = resp.getCmsDocument();
      } catch (IllegalExtendedCAServiceRequestException e) {
        log.error("Bad CA service", e);
      } catch (CADoesntExistsException e) {
View Full Code Here

TOP

Related Classes of org.ejbca.core.model.util.EjbLocalHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.