@Override protected V create(U key, Object... params) throws Exception { if (key == null) { throw new IllegalArgumentException("Parameter key can not be null!"); } return createObject(mainKey, key, params); } };
@Override protected boolean stale(U key, V value) throws Exception { if (valueStale(key, value)) { removeSiblingKeys(mainKey, key); return true; } return false; }
public Widget getWidget(String parentName, String shortName) throws UnifyException { return widgets.get(longNamesByShortName.get(parentName, shortName)); }
@Override public boolean isRemoteCallSetup(String remoteAppURL, String methodCode) throws UnifyException { return preferences.isKey(remoteAppURL, methodCode); }
@Override public void clearAllRemoteCallSetup(String remoteAppURL) throws UnifyException { preferences.remove(remoteAppURL); }
public V get(T mainKey, U key, Object... params) throws UnifyException { return get(mainKey).get(key, params); }
@Override public void clearRemoteCallSetup(String remoteAppURL, String methodCode) throws UnifyException { preferences.remove(remoteAppURL, methodCode); }
throws UnifyException { T result = null; if (!preferences.isKey(remoteAppURL, param.methodCode())) { throw new UnifyException(UnifyWebErrorConstants.REMOTECALL_CLIENT_SETUP_CODE_UNKNOWN, remoteAppURL, param.methodCode()); RemoteCallSetup remoteCallSetup = preferences.get(remoteAppURL, param.methodCode()); param.setClientAppCode(getApplicationCode()); OutputStream out = null;
public Collection<V> values(T key) throws UnifyException { return get(key).values(); }
@Override public void setupRemoteCall(String remoteAppURL, String methodCode, RemoteCallFormat format, Charset charset) throws UnifyException { logDebug("Setting up remote call with code = [{0}], remoteAppURL = [{1}]...", methodCode, remoteAppURL); if (preferences.isKey(remoteAppURL, methodCode)) { throw new UnifyException(UnifyWebErrorConstants.REMOTECALL_CLIENT_SETUP_CODE_EXISTS, remoteAppURL, methodCode); } logDebug("Discovering remote call method with code [{0}] for remote application [{1}]...", methodCode, remoteAppURL); String discoveryURL = getDiscoveryURL(remoteAppURL); if (!isRemoteCallSetup(discoveryURL, APIDiscoveryRemoteCallCodeConstants.DISCOVER_REMOTE_CALL)) { preferences.get(discoveryURL, APIDiscoveryRemoteCallCodeConstants.DISCOVER_REMOTE_CALL, discoveryURL, RemoteCallFormat.JSON, StandardCharsets.UTF_8); } DiscoverRemoteCallResult result = remoteCall(DiscoverRemoteCallResult.class, discoveryURL, new DiscoverRemoteCallParams(methodCode)); checkError(result); preferences.get(remoteAppURL, methodCode, result.getRemoteCallInfo().getUrl(), format, charset); logDebug("...remote call setup completed."); }
public Set<U> keySet(T key) throws UnifyException { return get(key).keySet(); }
public V remove(T mainKey, U key) throws UnifyException { return get(mainKey).remove(key); }