private DeployUnit createDeployUnit() { DeployUnit du = factory.createDeployUnit(); du.setName(project.getArtifact().getArtifactId()); String hashcode = ModelBuilderHelper.createKey(namespace, project.getArtifactId(), project.getVersion(), null); du.setHashcode(hashcode); du.setVersion(project.getArtifact().getBaseVersion()); Value platform = factory.createValue(); platform.setName("platform"); platform.setValue("java"); du.addFilters(platform); Value kevoreeVersion = factory.createValue(); kevoreeVersion.setName("kevoree_version"); kevoreeVersion.setValue(factory.getVersion()); du.addFilters(kevoreeVersion); Value timestamp = factory.createValue(); timestamp.setName("timestamp"); timestamp.setValue(String.valueOf(System.currentTimeMillis())); du.addFilters(timestamp); // add repositories for (Repository repo : project.getRepositories()) { Value repoVal = factory.createValue(); repoVal.setName("repo_" + repo.getId()); repoVal.setValue(repo.getUrl()); du.addFilters(repoVal); } // set Maven groupId:artifactId:version du.setUrl(project.getArtifact().getGroupId() + ":" + du.getName() + ":" + du.getVersion()); return du; }
Value fakeDicoValue = new DefaultKevoreeFactory().createValue(); fakeDicoValue.setValue(valueToInject); fakeDicoValue.setName(dicValue.getName()); Object reffoundO = registry.lookup(c); if (reffoundO != null) {
if (!inetAddress.isLoopbackAddress()) { Value netprop = core.getFactory().createValue(); netprop.setName(i + "_" + networkInterface.getName()); netprop.setValue(inetAddress.getHostAddress()); info.addValues(netprop);
if (!inetAddress.isLoopbackAddress()) { Value netprop = core.getFactory().createValue(); netprop.setName(i + "_" + networkInterface.getName()); netprop.setValue(inetAddress.getHostAddress()); info.addValues(netprop);
if (netprop == null) { netprop = factory.createValue(); netprop.setName(interfaceName); info.addValues(netprop);
if (netprop == null) { netprop = factory.createValue(); netprop.setName(interfaceName); info.addValues(netprop);
private static void processTypeDefinition(TypeDefinition td, DeployUnit du, CtClass clazz, ContainerRoot root, KevoreeFactory factory) throws Exception { if (Modifier.isAbstract(clazz.getModifiers())) { td.setAbstract(true); } else { td.setAbstract(false); } final Value javaClazz = factory.createValue(); javaClazz.setName("class:" + td.getName() + ":" + td.getVersion()); javaClazz.setValue(clazz.getName()); du.addFilters(javaClazz); td.addDeployUnits(du); try { checkParent(td, clazz.getSuperclass(), clazz, root, factory); } catch (NotFoundException e) { e.printStackTrace(); } try { for (CtClass interf : clazz.getInterfaces()) { checkParent(td, interf, clazz, root, factory); } } catch (NotFoundException e) { e.printStackTrace(); } }
private static void apply(ContainerNode node, Group group) { group.addSubNodes(node); node.addGroups(group); DictionaryType dictionaryType = group.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { DefaultKevoreeFactory factory = new DefaultKevoreeFactory(); FragmentDictionary fDic = factory.createFragmentDictionary(); fDic.setName(node.getName()); for (DictionaryAttribute attr : dictionaryType.getAttributes()) { if (attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); fDic.addValues(value); } } group.addFragmentDictionary(fDic); } } }
private static void apply(ContainerNode node, Group group) { group.addSubNodes(node); node.addGroups(group); DictionaryType dictionaryType = group.getTypeDefinition().getDictionaryType(); if (dictionaryType != null) { DefaultKevoreeFactory factory = new DefaultKevoreeFactory(); FragmentDictionary fDic = factory.createFragmentDictionary(); fDic.setName(node.getName()); for (DictionaryAttribute attr : dictionaryType.getAttributes()) { if (attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); fDic.addValues(value); } } group.addFragmentDictionary(fDic); } } }
if (!attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); dictionary.addValues(value);
if (!attr.getFragmentDependant()) { Value value = factory.createValue(); value.setName(attr.getName()); value.setValue(attr.getDefaultValue()); dictionary.addValues(value);
if (proposedVal == null) { Value param = factory.createValue(); param.setName(attr.getName()); param.setValue(attr.getDefaultValue()); node.getDictionary().addValues(param);
if (descVal != null && !descVal.isEmpty()) { Value desc = factory.createValue(); desc.setName("description"); desc.setValue(descVal); td.addMetaData(desc);