[eVista] Get attribute value from WEB itemHandle
Posted on 2006-12-11 14:43 hcfalan 阅读(456) 评论(0) 编辑 收藏 举报
//*********************************
// EnterpriseActionComponent
//*********************************
Manager esManager = ESUtil.getESManager(action_context);
Session esSession = ESUtil.getESSession(action_context, arguments);
String item_handle_string = (String)arguments.getString("inItemHandle");
ActionComponentUtil.assertArgument(action_context,
arguments,
"inItemHandle",
item_handle_string,
this);
Accessor accessor = (Accessor)esManager.getProcessor("base.Accessor", esSession);
// import com.sdrc.metaphase.enterprise.es.base.EntityHandle
EntityHandle entity_handle = accessor.reconstructEntityHandle(item_handle_string);
// import com.sdrc.metaphase.enterprise.es.base.ModelEntity
ModelEntity model_entity = accessor.get(entity_handle);
// get boolean value
boolean abc = model_entity.getData().getBooleanValue("bbkElecMagMatl");
// get string value
// import com.sdrc.metaphase.wcc.mwau.entitybean.ModelEntityBean
// import com.edsplm.tc.ent.wcc.mwau.entitybean.ModelEntityBeanFactory
ModelEntityBean bean = ModelEntityBeanFactory.createModelEntityBean(action_context, arguments, model_entity);
Object objPrtName = bean.getItemAttributeValue("Nomenclature");
String partName = (objPrtName == null ? null : objPrtName.toString());
// EnterpriseActionComponent
//*********************************
Manager esManager = ESUtil.getESManager(action_context);
Session esSession = ESUtil.getESSession(action_context, arguments);
String item_handle_string = (String)arguments.getString("inItemHandle");
ActionComponentUtil.assertArgument(action_context,
arguments,
"inItemHandle",
item_handle_string,
this);
Accessor accessor = (Accessor)esManager.getProcessor("base.Accessor", esSession);
// import com.sdrc.metaphase.enterprise.es.base.EntityHandle
EntityHandle entity_handle = accessor.reconstructEntityHandle(item_handle_string);
// import com.sdrc.metaphase.enterprise.es.base.ModelEntity
ModelEntity model_entity = accessor.get(entity_handle);
// get boolean value
boolean abc = model_entity.getData().getBooleanValue("bbkElecMagMatl");
// get string value
// import com.sdrc.metaphase.wcc.mwau.entitybean.ModelEntityBean
// import com.edsplm.tc.ent.wcc.mwau.entitybean.ModelEntityBeanFactory
ModelEntityBean bean = ModelEntityBeanFactory.createModelEntityBean(action_context, arguments, model_entity);
Object objPrtName = bean.getItemAttributeValue("Nomenclature");
String partName = (objPrtName == null ? null : objPrtName.toString());
Methods of ProcessorImpl:
//ProcessImpl methods:
MTIObject constructDialog(String dialog_class, String dialog_constant, String origin_class_name, MTIObject origin_object)
MTIObject constructDialog(String dialog_class, String dialog_constant, String origin_class_name, EntityHandle origin_handle, Collection extra_handle, Collection extra_str)
EnterpriseException convertMfailException(MfailException mfe)
ConsistencyStamp getConsistencyStamp(MTIObject mti_object)
ConsistencyStamp getConsistencyStamp(String stamp_string)
ConsistencyStamp reconstructConsistencyStamp(String stamp_string)
EntityHandle getEntityHandle(MTIObject mti_object)
EntityHandle getEntityHandle(String handle_string)
EntityHandle getEntityHandleByName(String entity_handle_name)
EntityHandle reconstructEntityHandle(String handle_string)
EntityData getEntitydata(EntityHandle entity_handle)
LoginContext getLoginContext()
MTIObject getMTIObject(EntityData entityData)
MTIObject getMTIObject(EntityHandle handle)
MTIObject getMTIObject(String handle_string)
Manager getManager()
String getMsgText(String msgId)
String getMsgText(String bundle_name, String msgId, String param[])
Processor getProcessor(String name)
Session getSession()
StatusReporter getStatusReporter()
TaskContext getTaskContext()
boolean isSubMTIClass(String parent_class_name, String class_name_to_check)
MTIObject constructDialog(String dialog_class, String dialog_constant, String origin_class_name, MTIObject origin_object)
MTIObject constructDialog(String dialog_class, String dialog_constant, String origin_class_name, EntityHandle origin_handle, Collection extra_handle, Collection extra_str)
EnterpriseException convertMfailException(MfailException mfe)
ConsistencyStamp getConsistencyStamp(MTIObject mti_object)
ConsistencyStamp getConsistencyStamp(String stamp_string)
ConsistencyStamp reconstructConsistencyStamp(String stamp_string)
EntityHandle getEntityHandle(MTIObject mti_object)
EntityHandle getEntityHandle(String handle_string)
EntityHandle getEntityHandleByName(String entity_handle_name)
EntityHandle reconstructEntityHandle(String handle_string)
EntityData getEntitydata(EntityHandle entity_handle)
LoginContext getLoginContext()
MTIObject getMTIObject(EntityData entityData)
MTIObject getMTIObject(EntityHandle handle)
MTIObject getMTIObject(String handle_string)
Manager getManager()
String getMsgText(String msgId)
String getMsgText(String bundle_name, String msgId, String param[])
Processor getProcessor(String name)
Session getSession()
StatusReporter getStatusReporter()
TaskContext getTaskContext()
boolean isSubMTIClass(String parent_class_name, String class_name_to_check)