use of org.talend.mdm.repository.model.mdmserverobject.WSCustomFormE in project tmdm-studio-se by Talend.
the class WSCustomFormItemImpl method setCustomForm.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setCustomForm(WSCustomFormE newCustomForm) {
WSCustomFormE oldCustomForm = customForm;
customForm = newCustomForm;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, MdmpropertiesPackage.WS_CUSTOM_FORM_ITEM__CUSTOM_FORM, oldCustomForm, customForm));
}
}
use of org.talend.mdm.repository.model.mdmserverobject.WSCustomFormE in project tmdm-studio-se by Talend.
the class WSCustomFormItemImpl method getCustomForm.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public WSCustomFormE getCustomForm() {
if (customForm != null && customForm.eIsProxy()) {
InternalEObject oldCustomForm = (InternalEObject) customForm;
customForm = (WSCustomFormE) eResolveProxy(oldCustomForm);
if (customForm.eResource() == null && eResource() != null) {
URI uri = EcoreUtil.getURI(customForm);
if (uri.hasFragment()) {
uri = uri.trimFragment();
}
Resource resource = eResource().getResourceSet().getResource(uri, true);
for (EObject object : resource.getContents()) {
if (object instanceof WSCustomFormE) {
customForm = (WSCustomFormE) object;
break;
}
}
}
if (customForm != oldCustomForm) {
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MdmpropertiesPackage.WS_CUSTOM_FORM_ITEM__CUSTOM_FORM, oldCustomForm, customForm));
}
}
}
return customForm;
}
use of org.talend.mdm.repository.model.mdmserverobject.WSCustomFormE in project tmdm-studio-se by Talend.
the class RepositoryQueryService method findAllCustomFormPks.
public static List<String> findAllCustomFormPks() {
List<IRepositoryViewObject> viewObjects = RepositoryResourceUtil.findAllViewObjects(IServerObjectRepositoryType.TYPE_CUSTOM_FORM);
List<String> names = new LinkedList<String>();
if (viewObjects != null) {
for (IRepositoryViewObject viewObj : viewObjects) {
Item item = viewObj.getProperty().getItem();
if (item instanceof MDMServerObjectItem) {
MDMServerObject sObject = ((MDMServerObjectItem) item).getMDMServerObject();
if (sObject instanceof WSCustomFormE) {
WSCustomFormE sForm = (WSCustomFormE) sObject;
String name = sForm.getDatamodel() + IConstants.ITEM_PK_SPLIT + sForm.getEntity() + IConstants.ITEM_PK_SPLIT + sForm.getName();
if (name != null) {
names.add(name);
} else {
names.add(viewObj.getLabel());
}
}
}
// names[i]=viewObj.getLabel();
}
}
return names;
}
Aggregations