@Override public String getString(String name, String def) { return parent.getString(name, def); }
@Override public String getString(String name) throws MException { return parent.getString(name); }
public String getTown() { return attributes.getString(MConstants.ADDR_TOWN, null); }
public String getCountry() { return attributes.getString(MConstants.ADDR_COUNTRY, null); }
public String getFirstName() { return attributes.getString(MConstants.ADDR_FIRST_NAME, null); }
public String getStreet() { return attributes.getString(MConstants.ADDR_STREET, null); }
public String getNameMid() { return attributes.getString(MConstants.ADDR_NAME_MID, null); }
public String getEmail() { return attributes.getString(MConstants.ADDR_EMAIL, null); }
public String getNameTitle() { return attributes.getString(MConstants.ADDR_NAME_TITLE, null); }
public String getHouseNumber() { return attributes.getString(MConstants.ADDR_HOUSE_NUMBER, null); }
public String getPhone() { return attributes.getString(MConstants.ADDR_PHONE, null); }
public String getLastName() { return attributes.getString(MConstants.ADDR_LAST_NAME, null); }
public String getNameAffix() { return attributes.getString(MConstants.ADDR_NAME_AFFIX, null); }
public String getMobile() { return attributes.getString(MConstants.ADDR_MOBILE, null); }
public Address.SALUTATION getSalutation() { return toSalutation(attributes.getString(MConstants.ADDR_SALUTATION, null)); }
@Override public boolean canExecute(CaoConfiguration configuration) { try { return configuration.getList().size() == 1 && configuration.getList().get(0) instanceof FdbNode && ! new File( ((FdbNode)configuration.getList().get(0)).getFile(), configuration.getProperties().getString(CreateConfiguration.NAME) ).exists() ; } catch (Throwable t) { log().d(t); return false; } }
@Override public boolean canExecute(CaoConfiguration configuration) { try { return configuration.getList().size() == 1 && core.containsNodes(configuration.getList()) && ! new File( ((FdbNode)configuration.getList().get(0)).getFile(), configuration.getProperties().getString(RenameConfiguration.NAME) ).exists() ; } catch (Throwable t) { log().d(t); return false; } }
@Override public RequestResult<Object> received(IProperties properties, Object... obj) { String functionName = properties.getString("function", null); if (functionName == null) { log().w("function not set",getJmsDestination()); return null; } functionName = functionName.toLowerCase(); FunctionDescriptor function = service.getFunction(functionName); if (function == null) { log().w("function not found",functionName,getJmsDestination()); return null; } return function.doExecute(properties, obj); }
@Override public OperationResult doExecuteInternal(CaoConfiguration configuration, Monitor monitor) throws CaoException { if (!canExecute(configuration)) return new NotSuccessful(getName(), "can't execute", -1); try { AdbNode parent = (AdbNode)configuration.getList().get(0); String rendition = configuration.getProperties().getString(DeleteRenditionConfiguration.RENDITION); // TODO delete rendition Changes changes = parent.adaptTo(Changes.class); if (changes != null) changes.deletedRendition(rendition); return new Successful(getName()); } catch (Throwable t) { log().d(t); return new NotSuccessful(getName(),t.toString(),-1); } }