/** * Prepare for independent definition of a new external child resource (without the parent context). * * @param name the name of the new external child resource * @return the external child resource prepared for create */ protected final FluentModelTImpl prepareIndependentDefine(String name) { FluentModelTImpl childResource = newChildResource(name); childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return childResource; }
/** * Prepare for inline definition of a new external child resource (along with the definition or update of parent resource). * * @param name the name of the new external child resource * @param key the key * @return the child resource */ protected final FluentModelTImpl prepareInlineDefine(String name, String key) { if (find(key) != null) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' already exists"); } FluentModelTImpl childResource = newChildResource(name); childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return super.prepareForFutureCommitOrPostRun(childResource); }