本文整理汇总了Java中mxmodelreflection.proxies.Module类的典型用法代码示例。如果您正苦于以下问题:Java Module类的具体用法?Java Module怎么用?Java Module使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Module类属于mxmodelreflection.proxies包,在下文中一共展示了Module类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateModule
import mxmodelreflection.proxies.Module; //导入依赖的package包/类
protected Object validateModule(IContext context, String moduleName) throws CoreException {
this.activeModule.add(moduleName);
if (!this.moduleMap.containsKey(moduleName)) {
this.moduleMap.put(moduleName, null);
IMendixObject obj = Core.instantiate(context, Module.getType());
obj.setValue(context, Module.MemberNames.ModuleName.toString(), moduleName);
if (this.allNewModules) {
this.moduleMap.put(moduleName, obj);
obj.setValue(context, Module.MemberNames.SynchronizeObjectsWithinModule.toString(), true);
}
Core.commit(context, obj);
}
return this.moduleMap.get(moduleName);
}
示例2: executeAction
import mxmodelreflection.proxies.Module; //导入依赖的package包/类
@Override
public Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Builder builder = new Builder();
builder.prepareSynchronization(this.getContext());
new MetaObjectBuilder(builder).buildMetaObjects(this.getContext());
new MicroflowBuilder(builder).buildMicroflows(this.getContext());
builder.removeInactiveModules(this.getContext());
FeedbackHelper.addRefreshClass(getContext(), Microflows.getType());
FeedbackHelper.addRefreshClass(getContext(), MxObjectType.getType());
FeedbackHelper.addRefreshClass(getContext(), Module.getType());
FeedbackHelper.addRefreshClass(getContext(), MxObjectMember.getType());
return true;
// END USER CODE
}
示例3: executeAction
import mxmodelreflection.proxies.Module; //导入依赖的package包/类
@Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Builder builder = new Builder();
builder.prepareSynchronization(this.getContext());
new MetaObjectBuilder(builder).buildMetaObjects(this.getContext());
new MicroflowBuilder(builder).buildMicroflows(this.getContext());
builder.removeInactiveModules(this.getContext());
FeedbackHelper.addRefreshClass(getContext(), Microflows.getType());
FeedbackHelper.addRefreshClass(getContext(), MxObjectType.getType());
FeedbackHelper.addRefreshClass(getContext(), Module.getType());
FeedbackHelper.addRefreshClass(getContext(), MxObjectMember.getType());
return true;
// END USER CODE
}
示例4: removeInactiveModules
import mxmodelreflection.proxies.Module; //导入依赖的package包/类
public void removeInactiveModules(IContext context) throws CoreException {
for (Entry<String, IMendixObject> entry : this.moduleMap.entrySet()) {
if (!this.activeModule.contains(entry.getKey())) {
if (entry.getValue() != null)
Core.delete(context, entry.getValue());
else
Core.delete(context, Core.retrieveXPathQuery(context, "//" + Module.getType() + "[" + Module.MemberNames.ModuleName + "='" + entry.getKey() + "']").get(0));
}
}
this.moduleMap.clear();
this.activeModule.clear();
}
示例5: cacheModules
import mxmodelreflection.proxies.Module; //导入依赖的package包/类
public void cacheModules(IContext context) throws CoreException {
List<IMendixObject> result = Core.retrieveXPathQuery(context, "//" + Module.getType());
if (result.size() == 0)
this.allNewModules = true;
else {
for (IMendixObject object : result) {
boolean syncModule = (Boolean) object.getValue(context, Module.MemberNames.SynchronizeObjectsWithinModule.toString());
String moduleName = (String) object.getValue(context, Module.MemberNames.ModuleName.toString());
if (syncModule)
this.moduleMap.put(moduleName, object);
else
this.moduleMap.put(moduleName, null);
}
}
}