本文整理汇总了Java中org.ligoj.app.model.Parameter类的典型用法代码示例。如果您正苦于以下问题:Java Parameter类的具体用法?Java Parameter怎么用?Java Parameter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Parameter类属于org.ligoj.app.model包,在下文中一共展示了Parameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
persistSystemEntities();
persistEntities("csv",
new Class[] { Node.class, Project.class, CacheCompany.class, CacheUser.class, DelegateNode.class, Parameter.class,
ProvLocation.class, ProvStorageType.class, Subscription.class, ParameterValue.class, ProvQuote.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Disable inner transaction
this.resource = new ProvAwsPriceImportResource();
applicationContext.getAutowireCapableBeanFactory().autowireBean(resource);
this.resource.initSpotToNewRegion();
this.resource.initEbsToApi();
this.resource.importCatalogResource = new ImportCatalogResource();
applicationContext.getAutowireCapableBeanFactory().autowireBean(this.resource.importCatalogResource);
initSpringSecurityContext(DEFAULT_USER);
resetImportTask();
}
示例2: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
persistEntities(
"csv", new Class[] { DelegateOrg.class, ContainerScope.class, CacheCompany.class, CacheUser.class, CacheGroup.class,
CacheMembership.class, Project.class, Node.class, Parameter.class, Subscription.class, ParameterValue.class,
CacheProjectGroup.class },
StandardCharsets.UTF_8.name());
CacheManager.getInstance().getCache("container-scopes").removeAll();
// Only with Spring context
this.subscription = getSubscription("gStack", IdentityResource.SERVICE_KEY);
// Coverage only
resource.getKey();
}
示例3: setGroup
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
private void setGroup(final Subscription subscription, final String group) {
final Parameter groupParameter = new Parameter();
groupParameter.setId(IdentityResource.PARAMETER_GROUP);
final ParameterValue groupParameterValue = new ParameterValue();
groupParameterValue.setParameter(groupParameter);
groupParameterValue.setData(group);
groupParameterValue.setSubscription(subscription);
em.persist(groupParameterValue);
em.flush();
}
示例4: setOu
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
private void setOu(final Subscription subscription, final String ou) {
final Parameter customerParameter = new Parameter();
customerParameter.setId(IdentityResource.PARAMETER_OU);
final ParameterValue customerParameterValue = new ParameterValue();
customerParameterValue.setParameter(customerParameter);
customerParameterValue.setData(ou);
customerParameterValue.setSubscription(subscription);
em.persist(customerParameterValue);
em.flush();
}
示例5: setParentGroup
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
private void setParentGroup(final Subscription subscription, final String parentGroup) {
final Parameter parentGroupParameter = new Parameter();
parentGroupParameter.setId(IdentityResource.PARAMETER_PARENT_GROUP);
final ParameterValue parentGroupParameterValue = new ParameterValue();
parentGroupParameterValue.setParameter(parentGroupParameter);
parentGroupParameterValue.setData(parentGroup);
parentGroupParameterValue.setSubscription(subscription);
em.persist(parentGroupParameterValue);
}
示例6: installNoId
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Test(expected = PluginException.class)
public void installNoId() {
csvForJpa.cleanup(SystemConfiguration.class, Node.class, Parameter.class, ParameterValue.class);
final NodeBasedIamProvider provider = new NodeBasedIamProvider();
applicationContext.getAutowireCapableBeanFactory().autowireBean(provider);
provider.install();
}
示例7: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistEntities("csv", new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Coverage only
resource.getKey();
}
示例8: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistSystemEntities();
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class, DelegateNode.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Coverage only
resource.getKey();
// Invalidate vCloud cache
CacheManager.getInstance().getCache("curl-tokens").removeAll();
}
示例9: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Coverage only
resource.getKey();
// Invalidate Fortify cache
CacheManager.getInstance().getCache("curl-tokens").removeAll();
}
示例10: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class },
StandardCharsets.UTF_8.name());
// Coverage only
resource.getKey();
}
示例11: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistSystemEntities();
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class, DelegateNode.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Coverage only
resource.getKey();
}
示例12: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class },
StandardCharsets.UTF_8.name());
this.subscription = getSubscription("gStack");
// Coverage only
resource.getKey();
}
示例13: link
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Test
public void link() throws Exception {
httpServer.stubFor(get(urlEqualTo("/sessions/new")).willReturn(aResponse().withStatus(HttpStatus.SC_OK)));
httpServer.stubFor(get(urlEqualTo("/api/authentication/validate?format=json"))
.willReturn(aResponse().withStatus(HttpStatus.SC_OK).withBody("{\"valid\":true}")));
httpServer.stubFor(get(urlEqualTo("/provisioning"))
.willReturn(aResponse().withStatus(HttpStatus.SC_OK).withBody("<html></html>")));
httpServer.stubFor(
get(urlEqualTo("/api/server/index?format=json")).willReturn(aResponse().withStatus(HttpStatus.SC_OK)
.withBody(IOUtils.toString(
new ClassPathResource("mock-server/sonar/sonar-server-index.json").getInputStream(),
StandardCharsets.UTF_8))));
httpServer.stubFor(
get(urlEqualTo("/api/resources?format=json&resource=16010&metrics=ncloc,coverage,sqale_rating"))
.willReturn(aResponse().withStatus(HttpStatus.SC_OK).withBody(IOUtils.toString(
new ClassPathResource("mock-server/sonar/sonar-resource-16010.json").getInputStream(),
StandardCharsets.UTF_8))));
httpServer.start();
// Attach the SonarQube project identifier
final Parameter parameter = new Parameter();
parameter.setId(SonarPluginResource.PARAMETER_PROJECT);
final Subscription subscription = em.find(Subscription.class, this.subscription);
final ParameterValue parameterValue = new ParameterValue();
parameterValue.setParameter(parameter);
parameterValue.setData("16010");
parameterValue.setSubscription(subscription);
em.persist(parameterValue);
em.flush();
// Invoke create for an already created entity, since for now, there is
// nothing but validation pour SonarQube
resource.link(this.subscription);
// Nothing to validate for now...
}
示例14: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
// Only with Spring context
persistEntities("csv",
new Class[] { Node.class, Parameter.class, Project.class, Subscription.class, ParameterValue.class, },
StandardCharsets.UTF_8.name());
// Coverage only
resource.getKey();
}
示例15: prepareData
import org.ligoj.app.model.Parameter; //导入依赖的package包/类
@Before
public void prepareData() throws IOException {
persistSystemEntities();
persistEntities("csv", new Class[] { Node.class, Project.class, Parameter.class, Subscription.class, ParameterValue.class },
StandardCharsets.UTF_8.name());
subscription = subscriptionRepository.findBy("node.id", "service:prov:aws:test");
}