/** * Create a new mechanism. */ public TTPAcquisitionMechanism(String ttpname) { this.ttpcid = ttpname==null? null: new ComponentIdentifier(ttpname); this.verify = true; this.rnd = new Random(); // setTTPCid(new ComponentIdentifier(ttpname)); // setverify(true); }
/** * Create a new agent factory for startup. * @param platform The platform. */ // This constructor is used by the Starter class and the ADFChecker plugin. public MicroAgentFactory(String providerid) { super(new ComponentIdentifier(providerid), IComponentFactory.class, null); this.loader = new MicroModelLoader(); }
/** * Create a new factory for startup. * @param platform The platform. */ // This constructor is used by the Starter class and the ADFChecker plugin. public BpmnFactory(String providerid) { super(new ComponentIdentifier(providerid), IComponentFactory.class, null); this.loader = new BpmnModelLoader(); }
/** * Create a new agent factory for startup. * @param platform The platform. */ // This constructor is used by the Starter class and the ADFChecker plugin. public BDIAgentFactory(String providerid) { super(new ComponentIdentifier(providerid), IComponentFactory.class, null); this.loader = new BDIModelLoader(); }
/** * Set the component identifier. */ public void setComponentIdentifier(IComponentIdentifier cid) { // System.out.println("set cid: "+cid+", "+(cid!=null ? SUtil.arrayToString(cid.getAddresses()):"[]")); this.cid = cid!=null? cid: new ComponentIdentifier(); // this.cid = aid!=null ? aid : cms.createComponentIdentifier(null, false, null); refresh(); }
public void customResultAvailable(Object result) { IComponentManagementService cms = (IComponentManagementService)result; nameediting = true; // ComponentIdentifierPanel.this.cid = cms.createComponentIdentifier(tfname.getText(), false, cid.getAddresses()); ComponentIdentifierPanel.this.cid = new ComponentIdentifier(tfname.getText(), cid.getAddresses()); cidChanged(); nameediting = false; } });
public void customResultAvailable(IComponentManagementService cms) { if(name.indexOf("@")==-1) { ret.setResult(new ComponentIdentifier(name, parent, parent.getAddresses())); // ret.setResult(cms.createComponentIdentifier(name, parent, parent.getAddresses())); } else { ret.setResult(new ComponentIdentifier(name)); // ret.setResult(cms.createComponentIdentifier(name, false)); } } });
/** * Get the root identifier. * @return The root identifier. */ public IComponentIdentifier getRoot() { // return new ComponentIdentifier(getPlatformName(), getAddresses(), getResolvers()); return new ComponentIdentifier(getPlatformName(), getAddresses()); }
/** * Clone this component identifier. * Does a deep copy. */ public Object clone() { ComponentIdentifier clone = new ComponentIdentifier(getName(), getAddresses()); // // Deep copy of resolvers. // ComponentIdentifier[] res = getResolvers(); // for(int i = 0; i < res.length; i++) // clone.addResolver((ComponentIdentifier)res[i].clone()); return clone; }
/** * Clone this component identifier. * Does a deep copy. */ public Object clone() { ComponentIdentifier clone = new ComponentIdentifier(getName(), getAddresses()); return clone; }
public void execute(Object args) { String[] tmp = (String[])args; secservice.setPlatformPassword(new ComponentIdentifier(tmp[0]), tmp[1]).addResultListener(new JCCResultListener<Void>(jcc) { public void customResultAvailable(Void result) { // doRefresh(); } }); } };
public void run() { String name = tf.getText(); IComponentIdentifier cid = name.length()>0? new ComponentIdentifier(name): null; AcquireCertificatePanel.this.secser.setAcquisitionMechanismParameterValue(mi.getClazz(), pi.getName(), cid); } }, tf);
/** * Get the root identifier. * @return The root identifier. */ public IComponentIdentifier getRoot() { return new ComponentIdentifier(getPlatformName(), getAddresses()); }
public void actionPerformed(ActionEvent e) { addSelectedAgent(new ComponentIdentifier("@"+access.getComponentIdentifier().getPlatformName(), (String[])null), list); } });
/** * */ public IFuture<Certificate> acquireCertificate(final String name) { final Future<Certificate> ret = new Future<Certificate>(); final IComponentIdentifier cid = new ComponentIdentifier(name); getTTPSecurityService().addResultListener(new ExceptionDelegationResultListener<ISecurityService, Certificate>(ret) { public void customResultAvailable(ISecurityService ss) { ss.getPlatformCertificate(cid).addResultListener(new DelegationResultListener<Certificate>(ret)); } }); return ret; }
/** * Set the ttpcid. * @param ttpcid The ttpcid to set. */ public void setTTPCid(IComponentIdentifier ttpcid) { if(ttpcid!=null) ttpcid = new ComponentIdentifier(ttpcid.getPlatformPrefix(), ttpcid.getAddresses()); this.ttpcid = ttpcid; getSecurityService().publishEvent(new ChangeEvent<Object>(getClass(), ISecurityService.PROPERTY_MECHANISMPARAMETER, new Object[]{"ttpcid", ttpcid})); }
/** * Update component identifier. * @param cid The component identifier. * @return The component identifier. */ public IComponentIdentifier internalUpdateComponentIdentifier(IComponentIdentifier cid) { ComponentIdentifier ret = null; if(cid.getPlatformName().equals(component.getComponentIdentifier().getRoot().getLocalName())) { ret = new ComponentIdentifier(cid.getName(), internalGetAddresses()); // System.out.println("Rewritten cid: "+ret+" :"+SUtil.arrayToString(ret.getAddresses())); } return ret==null? cid: ret; }
/** * Update component identifier. * @param cid The component identifier. * @return The component identifier. */ public IComponentIdentifier internalUpdateComponentIdentifier(IComponentIdentifier cid) { ComponentIdentifier ret = null; if(cid.getPlatformName().equals(component.getComponentIdentifier().getRoot().getLocalName())) { ret = new ComponentIdentifier(cid.getName(), internalGetAddresses()); // System.out.println("Rewritten cid: "+ret+" :"+SUtil.arrayToString(ret.getAddresses())); } return ret==null? cid: ret; }
/** * */ protected void addSelected() { if(!isTreeViewSelectionEmpty()) { IComponentIdentifier cid = getSelectedObject(); if(cid!=null) { addSelectedAgent(new ComponentIdentifier(cid.getName(), cid.getAddresses()), list); } } }
/** * Announce that addresses of transports might have changed. */ public IFuture<Void> refreshAddresses() { addresses = null; for(IDiscoveryService ds: SServiceProvider.getLocalServices(component, IDiscoveryService.class, RequiredServiceInfo.SCOPE_PLATFORM)) { ds.republish(); } // this is suboptimal currently because internalGetAddresses has to rebuild addresses immediately so // it could be done here return addrservice.addPlatformAddresses(new ComponentIdentifier(component.getComponentIdentifier().getRoot().getName(), internalGetAddresses())); }