See: Description
| Interface | Description |
|---|---|
| MetaTypeManager |
General service for managing meta types provided in mPRM.
|
Provides API for managing metatypes provided in mPRM.
The API's basic interface is MetaTypeManager and it can be accessed in two ways:
|
import com.prosyst.mprm.admin.mtp.MetaTypeManager; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; ..... public MetaTypeManager getMetaTypeManager(BundleContext context) { MetaTypeManager mtpManager = null; ServiceReference mtpRef = context.getServiceReference("com.prosyst.mprm.admin.mtp.MetaTypeManager"); if (mtpRef != null) { mtpManager = (MetaTypeManager)context.getService(mtpRef); } return mtpManager; } ..... |
com.prosyst.mprm.rac.RemoteAccessClient. An external stand-alone application can use this package by including system-rac.jar and gdm-rac.jar in its classpath.
|
import com.prosyst.mprm.admin.mtp.MetaTypeManager; import com.prosyst.mprm.rac.RemoteAccessClient; import java.util.Hashtable; ..... public MetaTypeManager getMetaTypeManager(RemoteAccessClient rac) { MetaTypeManager mtpManager = null; if (rac != null) { mtpManager = (MetaTypeManager)rac.getService("com.prosyst.mprm.admin.mtp.MetaTypeManager"); } return mtpManager; } ..... public static void main(String[] args) { //Open session using the system account. Hashtable credentials = new Hashtable(); credentials.put(RemoteAccessClient.USER_PASSWORD, "system"); RemoteAccessClient rac = RemoteAccessClient.connect("socket://mprm.acme.com:11449", "system", credentials, null); ... //Now the application can access MetaTypeManager service MetaTypeManager mtpManager = getMetaTypeManager(rac); ... //closing session rac.close(); } ..... |
Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.