@Override public int getCollectionCount(String dbCollectionName) { return delegate.getCollectionCount(dbCollectionName); }
@Override public Repository getRepository() { return delegate.getRepository(); }
public MetaClass getMetaClass(CMSPriority p, String repoName, String metaclassName, int version) { Repository repo = repositoryService.getRepository(repoName); MetadataContext context = new MetadataContext(); context.setDbConfig(dbConfig); return repo.getMetadataService().getMetaClass(metaclassName, version, context); }
public MetaClass getMetaClass(CMSPriority p, String repoName, String metaclassName) { Repository repo = repositoryService.getRepository(repoName); return repo.getMetadataService().getMetaClass(metaclassName); }
private void createIndexesOnCollection(IPersistenceService persistenceService, String repoName, boolean isMainBranch, PersistenceContext context) { Repository repo = repositoryService.getRepository(repoName); List<MetaClass> metasInRepo = repo.getMetadataService().getMetaClasses(new MetadataContext(true, true)); if (metasInRepo.size() > 0) { persistenceService.ensureIndex(metasInRepo, context, isMainBranch); } }
@Test(expected = MetaClassNotExistsException.class) public void testDeleteMetaField02MetaNotExisting() { IMetadataService metaService = repositoryService.getRepository("stratus-ci").getMetadataService(); MetadataContext metaContext = new MetadataContext(); metaService.deleteMetaField("NoSuchBase", "noSuchField", metaContext); }
public MetaClass newClass(String repoName, String metaType){ MetaClass metaClass = new MetaClass(); metaClass.setRepository(repoName); metaClass.setName(metaType); metaService.createMetaClass(metaClass, new MetadataContext()); return metaClass; }
@Test(expected = MetaDataException.class) public void testDeleteMetaClasses02StillRerferencing() { IMetadataService metaService = repositoryService.getRepository("stratus-ci").getMetadataService(); MetadataContext metaContext = new MetadataContext(); metaService.deleteMetaClass("Base", metaContext); }
private JsonEntity newApplicationService(String branchId){ String metaType = APPLICATION_SERVICE; MetaClass instCls = repoService.getRepository(RAPTOR_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("name", "Dummy Application Service Instance for Entity-Branch Test:" + (appCount++)); return newEntity; }
@Test(expected=MetaFieldNotExistsException.class) public void testDeleteMetaField01NotExisting() { IMetadataService metaService = repositoryService.getRepository("stratus-ci").getMetadataService(); MetadataContext metaContext = new MetadataContext(); metaService.deleteMetaField("Base", "noSuchField", metaContext); }
public MetaClass newClass(String repoName, String metaType){ MetaClass metaClass = new MetaClass(); metaClass.setRepository(repoName); metaClass.setName(metaType); metaService.createMetaClass(metaClass, new MetadataContext()); return metaClass; }
private JsonEntity buildQueryEntity(String reponame, String branchname, String metadata, String oid) { MetaClass meta = repoService.getRepository(reponame).getMetadataService().getMetaClass(metadata); JsonEntity queryEntity = new JsonEntity(meta); queryEntity.setId(oid); queryEntity.setBranchId(branchname); return queryEntity; } }
public MetaClass newClass(String repoName, String metaType){ MetaClass metaClass = new MetaClass(); metaClass.setRepository(repoName); metaClass.setName(metaType); metaService.createMetaClass(metaClass, new MetadataContext()); return metaClass; }
private JsonEntity buildQueryEntity(String reponame, String branchname, String metadata, String oid) { MetaClass meta = repoService.getRepository(reponame).getMetadataService().getMetaClass(metadata); JsonEntity queryEntity = new JsonEntity(meta); queryEntity.setId(oid); queryEntity.setBranchId(branchname); return queryEntity; }
protected JsonEntity newApplicationService(String branchId){ String metaType = APPLICATION_SERVICE; MetaClass instCls = repoService.getRepository(RAPTOR_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("name", "Dummy Application Service Instance for Entity-Branch Test"); return newEntity; }
private JsonEntity buildQueryEntity(String reponame, String branchname, String metadata, String oid) { MetaClass meta = repoService.getRepository(reponame).getMetadataService().getMetaClass(metadata); JsonEntity queryEntity = new JsonEntity(meta); queryEntity.setId(oid); queryEntity.setBranchId(branchname); return queryEntity; } }
private JsonEntity newServiceInstance(String branchId, String name){ String metaType = "ServiceInstance"; MetaClass instCls = repoService.getRepository(RAPTOR_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("name", name); return newEntity; }
protected JsonEntity newServiceInstance(String branchId){ String metaType = SERVICE_INSTANCE; MetaClass instCls = repoService.getRepository(RAPTOR_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("name", "Dummy Service Instance for Entity-Branch Test"); return newEntity; }
private JsonEntity newNetworkAddress(String branchId){ String metaType = "NetworkAddress"; MetaClass instCls = repoService.getRepository(CMSDB_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("address", "127.0.0.1"); newEntity.addFieldValue("ipVersion", "IPv4"); newEntity.addFieldValue("resourceId", "Dummy NodeServer for Entity-Branch Test:" + (appCount++)); return newEntity; }
protected JsonEntity newNetworkAddress(String branchId, int seq){ String metaType = NETWORK_ADDRESS; MetaClass instCls = repoService.getRepository(STRATUS_REPO).getMetadataService().getMetaClass(metaType); JsonEntity newEntity = new JsonEntity(instCls); newEntity.setBranchId(branchId); newEntity.addFieldValue("ipaddress", "1011.249.64.99"); newEntity.addFieldValue("hostname", "a.ebay.com"); newEntity.addFieldValue("zone", "corp"); newEntity.addFieldValue(_802_ADDRESS, "00:e0:ce:af:" + seq); return newEntity; }