Examples of Base64GetHashMap


Examples of org.ejbca.util.Base64GetHashMap

                java.beans.XMLDecoder decoder;
                decoder = new java.beans.XMLDecoder(new java.io.ByteArrayInputStream(databytes));
                HashMap h = (HashMap) decoder.readObject();
                decoder.close();
                // Handle Base64 encoded string values
                HashMap data = new Base64GetHashMap(h);
                ret = new PublisherQueueVolatileData();
                ret.loadData(data);
                if (ret.isUpgraded()) {
                    setPublisherQueueVolatileData(ret);
                }
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

          }
          final java.beans.XMLDecoder decoder = new  java.beans.XMLDecoder(new java.io.ByteArrayInputStream(getData().getBytes("UTF8")));
          final HashMap h = (HashMap) decoder.readObject();
            decoder.close();
            // Handle Base64 encoded string values
            final HashMap<Object, Object> data = new Base64GetHashMap(h);
           
            // If CA-data is upgraded we want to save the new data, so we must get the old version before loading the data
            // and perhaps upgrading
            final float oldversion = ((Float) data.get(UpgradeableDataHashMap.VERSION)).floatValue();
            switch(((Integer)(data.get(CA.CATYPE))).intValue()){
                case CAInfo.CATYPE_X509:
                    ca = new X509CA(data, getCaId().intValue(), getSubjectDN(), getName(), getStatus(), getUpdateTimeAsDate(), new Date(getExpireTime()));                   
                    break;
                case CAInfo.CATYPE_CVC:
                    ca = new CVCCA(data, getCaId().intValue(), getSubjectDN(), getName(), getStatus(), getUpdateTimeAsDate());                   
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

        throw new RuntimeException(e);
      }
      HashMap h = (HashMap) decoder.readObject();
      decoder.close();
      // Handle Base64 encoded string values
      HashMap data = new Base64GetHashMap(h);
      float oldversion = ((Float) data.get(UpgradeableDataHashMap.VERSION)).floatValue();
      ServiceConfiguration serviceConfiguration = new ServiceConfiguration();
      serviceConfiguration.loadData(data);
      if ( ((serviceConfiguration != null) && (Float.compare(oldversion, serviceConfiguration.getVersion()) != 0))) {
        // Upgrade in version 4 of ServiceConfiguration. If we do not have nextRunTimeStamp and runTimeStamp set in
        // the database, but we have them in serviceConfiguration, we will simply copy the values over.
        // After this we will not use the values in ServiceConfiguration any more
        final String NEXTRUNTIMESTAMP = "NEXTRUNTIMESTAMP";
        final String OLDRUNTIMESTAMP = "OLDRUNTIMESTAMP";
        if ((getNextRunTimeStamp() == 0) && (data.get(NEXTRUNTIMESTAMP) != null)) {
          final long nextRunTs = ((Long) data.get(NEXTRUNTIMESTAMP)).longValue();
          log.debug("Upgrading nextRunTimeStamp to "+nextRunTs);
          setNextRunTimeStamp(nextRunTs);
        }
        if ((getRunTimeStamp() == 0) && (data.get(OLDRUNTIMESTAMP) != null)) {
          final long runTs = ((Long) data.get(OLDRUNTIMESTAMP)).longValue();
          log.debug("Upgrading runTimeStamp to "+runTs);
          setRunTimeStamp(runTs);
        }
        setServiceConfiguration(serviceConfiguration);
      }
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

                throw new EJBException(e);
            }
            HashMap h = (HashMap) decoder.readObject();
            decoder.close();
            // Handle Base64 encoded string values
            HashMap data = new Base64GetHashMap(h);

            switch (((Integer) (data.get(BasePublisher.TYPE))).intValue()) {
            case PublisherConst.TYPE_LDAPPUBLISHER:
                publisher = new LdapPublisher();
                break;
            case PublisherConst.TYPE_LDAPSEARCHPUBLISHER:
                publisher = new LdapSearchPublisher();
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

            throw new RuntimeException(e);
        }
        HashMap h = (HashMap) decoder.readObject();
        decoder.close();
        // Handle Base64 encoded string values
        HashMap data = new Base64GetHashMap(h);
        switch (((Integer) (data.get(HardTokenProfile.TYPE))).intValue()) {
        case SwedishEIDProfile.TYPE_SWEDISHEID:
            profile = new SwedishEIDProfile();
            break;
        case EnhancedEIDProfile.TYPE_ENHANCEDEID:
            profile = new EnhancedEIDProfile();
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

            throw new EJBException(e);
          }
          HashMap h = (HashMap) decoder.readObject();
          decoder.close();
          // Handle Base64 encoded string values
          HashMap data = new Base64GetHashMap(h);
          switch (((Integer) (data.get(BaseUserDataSource.TYPE))).intValue()) {
          case CustomUserDataSourceContainer.TYPE_CUSTOMUSERDATASOURCECONTAINER:
            userdatasource = new CustomUserDataSourceContainer();
            break;
          }
          userdatasource.loadData(data);
View Full Code Here

Examples of org.ejbca.util.Base64GetHashMap

            try {
              java.beans.XMLDecoder decoder = new  java.beans.XMLDecoder(new java.io.ByteArrayInputStream(extendedinfostring.getBytes("UTF8")));             
              HashMap h = (HashMap) decoder.readObject();
              decoder.close();
                // Handle Base64 encoded string values
                HashMap data = new Base64GetHashMap(h);
              int type = ((Integer) data.get(ExtendedInformation.TYPE)).intValue();
              switch(type){
                case ExtendedInformation.TYPE_BASIC :
                  returnval = new ExtendedInformation();             
                  returnval.loadData(data);
                  break;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.