public static MProperties toMProperties(IReadProperties properties) { if (properties == null) return null; if (properties instanceof MProperties) return (MProperties)properties; return new MProperties(properties); }
public IReadProperties getMeta() { if (meta == null) meta = new MProperties(); return meta; }
public static IProperties toIProperties(IReadProperties properties) { if (properties == null) return null; if (properties instanceof IProperties) return (IProperties)properties; return new MProperties(properties); }
/** * This will handle the strings like properties. Means a string without separator will be * stored as value with an increasing key as integer, e.g. [val1, val2, a=b] will be 0=val1, 1=val2, a=b * @param properties * @return The MProperties */ public static MProperties explodeToMProperties(String[] properties) { if (properties == null) return new MProperties(); return explodeToMProperties(properties, '=', ':', 0, properties.length); }
public static MProperties loadOrEmpty(File f) { MProperties out = load(f); if (out == null) out = new MProperties(); return out; }
public synchronized IReadProperties getConditionConfig(String name) { if (conditionConfigs == null) conditionConfigs = new MProperties(); return new PropertiesSubset(conditionConfigs,name + "."); } public boolean isEnabled() {
public static MProperties explodeToMProperties(String[] properties, int offset, int length) { if (properties == null) return new MProperties(); return explodeToMProperties(properties, '=', ':', offset, length); }
public static MProperties explodeToMProperties(String[] properties, char keySeparator, char typeSeparator, int offset, int length) { MProperties p = new MProperties(); if (properties != null) { for (int i = 0; i < length; i++) { int pos = i + offset; if (pos >= properties.length) break; String item = properties[pos]; if (item != null) appendToMap(p, item, keySeparator, typeSeparator); } } return p; }
public static MProperties load(Reader is) { Properties p = new Properties(); try { p.load(is); } catch (Throwable t) { MLogUtil.log().d(t); } MProperties out = new MProperties(p); return out; }
public static MProperties load(InputStream inStream) throws IOException { MProperties out = new MProperties(); out.load0(new LineReader(inStream)); return out; }
public static IProperties getProperties(Message msg) throws JMSException { MProperties out = new MProperties(); if (msg == null) return out; @SuppressWarnings("unchecked") Enumeration<String> enu = msg.getPropertyNames(); while (enu.hasMoreElements()) { String name = enu.nextElement(); out.setProperty( name, msg.getObjectProperty(name) ); } return out; }
public static IProperties getMapProperties(MapMessage msg) throws JMSException { MProperties out = new MProperties(); if (msg == null) return out; @SuppressWarnings("unchecked") Enumeration<String> enu = msg.getMapNames(); while (enu.hasMoreElements()) { String name = enu.nextElement(); out.setProperty( name, msg.getObject(name) ); } return out; }
void indexFile(File f) throws IOException { File meta = getMetaFileFor(f); MProperties p = MProperties.load(meta); if (p == null) p = new MProperties(); String id = p.getString("_id", null); if (id == null) { id = UUID.randomUUID().toString(); p.setString("_id", id); p.save(meta); } rememberIndex(f,id); }
@Override public void doExecuteActivity() throws Exception { MProperties parameters = new MProperties(); String msg = prepareMessage(parameters); if (msg == null) return; // ignore and go ahead if msg name is null // send MUri uri = MUri.toUri("bpmm://" + msg); ((InternalEngine)getContext().getEEngine()).execute(uri, parameters); }
@Override public String doExecute() throws Exception { MProperties parameters = new MProperties(); String msg = prepareSignal(parameters); if (msg == null) return null; // ignore and go ahead if msg name is null // send MUri uri = MUri.toUri("bpms://" + msg); ((InternalEngine)getContext().getEEngine()).execute(uri, parameters); return null; }
@Override public String doExecute() throws Exception { MProperties parameters = new MProperties(); String msg = prepareMessage(parameters); if (msg == null) return null; // ignore and go ahead if msg name is null // send MUri uri = MUri.toUri("bpmm://" + msg); ((InternalEngine)getContext().getEEngine()).execute(uri, parameters); return null; }
@Override public String doExecute() throws Exception { MProperties parameters = new MProperties(); String msg = prepareExternal(parameters); if (msg == null) return null; // ignore and go ahead if msg name is null // send MUri uri = MUri.toUri("bpme://" + msg); ((InternalEngine)getContext().getEEngine()).execute(uri, parameters); return null; }
@Override public void doExecuteActivity() throws Exception { MProperties parameters = new MProperties(); String msg = prepareSignal(parameters); if (msg == null) return; // ignore and go ahead if msg name is null // send MUri uri = MUri.toUri("bpms://" + msg); ((InternalEngine)getContext().getEEngine()).execute(uri, parameters); }
private void removeIds(File file) { File meta = ((FdbCore)core).getMetaFileFor(file); MProperties p = MProperties.load(meta); if (p == null) p = new MProperties(); p.remove("_id"); try { p.save(meta); } catch (IOException e) { log().e(file,e); } }
public VaultEntry(VaultEntry clone) { target = clone.getTarget(); group = clone.getGroup(); secretKeyId = clone.getSecretKeyId(); secretId = clone.getSecretId(); secret = clone.getSecret(); meta = new MProperties(clone.getMeta()); validFrom = clone.getValidFrom(); validTo = clone.getValidTo(); creator = clone.getCreator(); }