public Repository createConnection(Map<String, Object> properties) throws RRepositoryException { return RepositoryFactoryInstatiator.newFactory(properties, true); }
/** * Create new repository instance. * * @param factory the class name to instantiate. * @param params the initialization parameters. * @return the initialized repository. */ public static Repository newRepository(String factory, Map<String, String> params) { Repository repository = newInstance(factory); if (params != null) { setParams(repository, params); } initialize(repository); return repository; }
@Override public ProjectVersion getVersion(int index) throws RRepositoryException { List<RVersion> verHist = getVersionHistory(); RVersion lastVersion = verHist.get(verHist.size() - 1); Date modifiedAt = lastVersion.getCreated(); String modifiedBy = lastVersion.getCreatedBy().getUserName(); return createRepositoryProjectVersion(verHist.get(index), modifiedAt, modifiedBy); }
public LockInfoImpl(RLock ralLock) { isLocked = ralLock.isLocked(); if (isLocked) { lockedAt = ralLock.getLockedAt(); lockedBy = new WorkspaceUserImpl(ralLock.getLockedBy().getUserName()); } }
public ProjectVersion getVersion() { // FIXME RVersion rv = getActiveVersion(); RepositoryVersionInfoImpl rvii = new RepositoryVersionInfoImpl(rv.getCreated(), rv.getCreatedBy().getUserName()); return new RepositoryProjectVersionImpl(rv, rvii); }
public JcrVersion(RVersion version) { this.version = new CommonVersionImpl(version); this.lastModified = version.getCreated(); this.modifiedBy = version.getCreatedBy().getUserName(); }
public void contextDestroyed(ServletContextEvent event) { try { ProductionRepositoryFactoryProxy.release(); } catch (RRepositoryException e) { LOG.error("Failed to release production repository", e); } try { RulesRepositoryFactory.release(); } catch (RRepositoryException e) { LOG.error("Failed to release rules repository", e); } String name = event.getServletContext().getServletContextName(); LOG.info(name + " is down."); }
/** * Initializes repository using target properties * @param properties */ public RulesDeployerService(Properties properties) { Map<String, String> params = new HashMap<>(); params.put("uri", properties.getProperty("production-repository.uri")); params.put("login", properties.getProperty("production-repository.login")); params.put("password", properties.getProperty("production-repository.password")); params.put("bucketName",properties.getProperty("production-repository.bucket-name")); params.put("regionName",properties.getProperty("production-repository.region-name")); params.put("accessKey",properties.getProperty("production-repository.access-key")); params.put("secretKey",properties.getProperty("production-repository.secret-key")); params.put("listener-timer-period",properties.getProperty("production-repository.listener-timer-period")); this.deployRepo = RepositoryInstatiator .newRepository(properties.getProperty("production-repository.factory"), params); }
@Override public ProjectVersion getVersion(int index) throws RRepositoryException { List<RVersion> verHist = getVersionHistory(); RVersion lastVersion = verHist.get(verHist.size() - 1); Date modifiedAt = lastVersion.getCreated(); String modifiedBy = lastVersion.getCreatedBy().getUserName(); return createRepositoryProjectVersion(verHist.get(index), modifiedAt, modifiedBy); }
/** * Create new repository instance. * * @param factory the class name to instantiate. * @param params the initialization parameters. * @return the initialized repository. */ public static Repository newRepository(String factory, Map<String, String> params) { Repository repository = newInstance(factory); if (params != null) { setParams(repository, params); } initialize(repository); return repository; }
public ProjectVersion getVersion() { // FIXME RVersion rv = getActiveVersion(); RepositoryVersionInfoImpl rvii = new RepositoryVersionInfoImpl(rv.getCreated(), rv.getCreatedBy().getUserName()); return new RepositoryProjectVersionImpl(rv, rvii); }
private Repository createFactory(String propertiesFileName) throws RRepositoryException { ConfigurationManager configurationManager = configManagerFactory.getConfigurationManager(propertiesFileName); Map<String, Object> properties = configurationManager.getProperties(); return RepositoryFactoryInstatiator.newFactory(properties, false); }
public JcrVersion(RVersion version) { this.version = new CommonVersionImpl(version); this.lastModified = version.getCreated(); this.modifiedBy = version.getCreatedBy().getUserName(); }
private Repository createFactory(String propertiesFileName) throws RRepositoryException { ConfigurationManager configurationManager = configManagerFactory.getConfigurationManager(propertiesFileName); Map<String, Object> properties = configurationManager.getProperties(); return RepositoryFactoryInstatiator.newFactory(properties, false); }