/** * Prepare this external child resource for update. * * @return this external child resource prepared for update */ @SuppressWarnings("unchecked") protected final FluentModelT prepareUpdate() { this.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return (FluentModelT) this; }
/** * Prepare the given model of an external child resource for independent definition (without the parent context). * * @param model the model to prepare for independent create definition * @return the external child resource prepared for create */ protected final FluentModelTImpl prepareIndependentDefine(FluentModelTImpl model) { model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return model; }
/** * Prepare the given model of an external child resource for independent definition (without the parent context). * * @param model the model to prepare for independent create definition * @return the external child resource prepared for create */ protected final FluentModelTImpl prepareIndependentDefine(FluentModelTImpl model) { model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return model; }
/** * Prepare this external child resource for update. * * @return this external child resource prepared for update */ @SuppressWarnings("unchecked") protected final FluentModelT prepareUpdate() { this.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); return (FluentModelT) this; }
/** * 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; }
/** * Mark that there is no action pending on this child resource and clear * any cached result, i.e. the output produced by the invocation of last * action. */ public void clear() { this.setPendingOperation(PendingOperation.None); this.childAction.clear(); }
/** * Mark that there is no action pending on this child resource and clear * any cached result, i.e. the output produced by the invocation of last * action. */ public void clear() { this.setPendingOperation(PendingOperation.None); this.childAction.clear(); }
/** * 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); }
/** * 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); }
/** * Prepare for inline removal of an external child resource (along with the update of parent resource). * * @param name the name of the external child resource * @param key the key */ protected final void prepareInlineRemove(String name, String key) { FluentModelTImpl childResource = find(key); if (childResource == null || childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeCreated) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' not found"); } childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeRemoved); super.prepareForFutureCommitOrPostRun(childResource); }
/** * Prepare for inline removal of an external child resource (along with the update of parent resource). * * @param name the name of the external child resource * @param key the key */ protected final void prepareInlineRemove(String name, String key) { FluentModelTImpl childResource = find(key); if (childResource == null || childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeCreated) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' not found"); } childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeRemoved); super.prepareForFutureCommitOrPostRun(childResource); }
/** * Prepare for inline update of an external child resource (along with the update of parent resource). * * @param name the name of the external child resource * @param key the key * @return the external child resource to be updated */ protected final FluentModelTImpl prepareInlineUpdate(String name, String key) { FluentModelTImpl childResource = find(key); if (childResource == null || childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeCreated) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' not found"); } if (childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeRemoved) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' is marked for deletion"); } childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeUpdated); return super.prepareForFutureCommitOrPostRun(childResource); }
/** * Prepare for inline update of an external child resource (along with the update of parent resource). * * @param name the name of the external child resource * @param key the key * @return the external child resource to be updated */ protected final FluentModelTImpl prepareInlineUpdate(String name, String key) { FluentModelTImpl childResource = find(key); if (childResource == null || childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeCreated) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' not found"); } if (childResource.pendingOperation() == ExternalChildResourceImpl.PendingOperation.ToBeRemoved) { throw new IllegalArgumentException("A child resource ('" + childResourceName + "') with name (key) '" + name + " (" + key + ")' is marked for deletion"); } childResource.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeUpdated); return super.prepareForFutureCommitOrPostRun(childResource); }
/** * Prepare the given model of an external child resource for inline removal (along with the definition or update of parent resource). * * @param model the model representing child resource to remove */ protected final void prepareInlineRemove(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeRemoved); this.childCollection.put(model.childResourceKey(), model); super.prepareForFutureCommitOrPostRun(model); }
/** * Prepare the given model of an external child resource for inline create (along with the definition or update of parent resource). * * @param model the model to track create changes * @return the external child resource prepared for create */ protected final FluentModelTImpl prepareInlineDefine(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); this.childCollection.put(model.childResourceKey(), model); return super.prepareForFutureCommitOrPostRun(model); }
/** * Prepare the given model of an external child resource for inline removal (along with the definition or update of parent resource). * * @param model the model representing child resource to remove */ protected final void prepareInlineRemove(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeRemoved); this.childCollection.put(model.childResourceKey(), model); super.prepareForFutureCommitOrPostRun(model); }
/** * Prepare the given model of an external child resource for inline create (along with the definition or update of parent resource). * * @param model the model to track create changes * @return the external child resource prepared for create */ protected final FluentModelTImpl prepareInlineDefine(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeCreated); this.childCollection.put(model.childResourceKey(), model); return super.prepareForFutureCommitOrPostRun(model); }
/** * Prepare the given model of an external child resource for inline update (along with the definition or update of parent resource). * * @param model the model to track update changes * @return the external child resource prepared for update */ protected final FluentModelTImpl prepareInlineUpdate(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeUpdated); this.childCollection.put(model.childResourceKey(), model); return super.prepareForFutureCommitOrPostRun(model); }
/** * Prepare the given model of an external child resource for inline update (along with the definition or update of parent resource). * * @param model the model to track update changes * @return the external child resource prepared for update */ protected final FluentModelTImpl prepareInlineUpdate(FluentModelTImpl model) { FluentModelTImpl childResource = find(model.childResourceKey()); if (childResource != null) { throw new IllegalArgumentException(pendingOperationMessage(model.name(), model.childResourceKey())); } model.setPendingOperation(ExternalChildResourceImpl.PendingOperation.ToBeUpdated); this.childCollection.put(model.childResourceKey(), model); return super.prepareForFutureCommitOrPostRun(model); }