public static RefactorOperationBuilder<QueryOperationRequest>.PossiblyRequiresPart references( String fullyQualifiedResourceName, ResourceType type) { RefactorOperationBuilder<QueryOperationRequest> builder = RefactorOperationBuilderFactory.newResourceBasedInstance( fullyQualifiedResourceName, type, OperationType.QUERY); return builder.possiblyRequiresPart(builder); }
public static RefactorOperationBuilder<RefactorOperationRequest>.RequiresModule refactorReferences( String fullyQualifiedResourceName, ResourceType type, String newFQN) { RefactorOperationBuilder<RefactorOperationRequest> builder = RefactorOperationBuilderFactory.newResourceBasedInstance( fullyQualifiedResourceName, type, OperationType.REFACTOR); return builder.requiresModule(builder); }
public static RefactorOperationBuilder<QueryOperationRequest>.RequiresModule referencesSharedPart( String fullyQualifiedPartName, PartType partType, TermSearchType searchType) { RefactorOperationBuilder<QueryOperationRequest> builder = RefactorOperationBuilderFactory.newSharedPartBasedInstance( fullyQualifiedPartName, partType, searchType, OperationType.QUERY); return builder.requiresModule(builder); }
private R internalBuild() { this.request.setChangeType(changeType); // OCRAM: clone? this.request.queryTerms = this.queryTerms; this.request.setStartRowIndex(startRowIndex); this.request.setPageSize(pageSize); this.request.setModuleName(moduleName); this.request.setModuleRootPathURI(moduleRootPathURI); this.request.setBranchName(branchName); return this.request; }
@SuppressWarnings("unchecked") private static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newInstance(OperationType operation) { T request; switch(operation) { case QUERY: request = (T) new QueryOperationRequest(); break; case DELETE: request = (T) new DeleteOperationRequest(); break; case REFACTOR: request = (T) new RefactorOperationRequest(); break; default: throw new UnsupportedOperationException("Unsupported request type: " + operation.toString()); } return new RefactorOperationBuilder<>(operation, request); }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newSharedPartBasedInstance( String sharedPartName, PartType type, OperationType operation) { // OCRAM: check that part type is a shared-part type RefactorOperationBuilder<T> builder = newInstance(operation); builder.getQueryTerms().add(new ValueSharedPartIndexTerm(sharedPartName, type)); return builder; }
public static RefactorOperationBuilder<QueryOperationRequest>.RequiresModule referencesPart( String fullyQualifiedResourceName, String fullyQualifiedPartName, PartType partType, TermSearchType searchType) { RefactorOperationBuilder<QueryOperationRequest> builder = RefactorOperationBuilderFactory.newResourcePartBasedInstance( fullyQualifiedResourceName, fullyQualifiedPartName, partType, searchType, OperationType.QUERY); return builder.requiresModule(builder); } }
public static RefactorOperationBuilder<DeleteOperationRequest>.PossiblyRequiresPart deletePartReferences( String fullyQualifiedResourceName, String partName, PartType partType ) { RefactorOperationBuilder<DeleteOperationRequest> builder = RefactorOperationBuilderFactory.newResourcePartBasedInstance( fullyQualifiedResourceName, partName, partType, OperationType.DELETE); return builder.possiblyRequiresPart(builder); }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newResourceBasedInstance( String resourceName, ResourceType type, String newResourceName, OperationType operation) { RefactorOperationBuilder<T> builder = newInstance(operation); // TODO: info for new name?? return builder; }
RefactorOperationBuilder<R>.RequiresPart requiresPart(RefactorOperationBuilder<R> builder) { return new RequiresPart(builder); }
RequiresModule requiresModule(RefactorOperationBuilder<R> builder) { return new RequiresModule(builder); }
RefactorOperationBuilder<R>.PossiblyRequiresPart possiblyRequiresPart(RefactorOperationBuilder<R> builder) { return new PossiblyRequiresPart(builder); }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newSharedPartBasedInstance( String sharedPartName, PartType type, TermSearchType searchType, OperationType operation) { // OCRAM: check that part type is a shared-part type RefactorOperationBuilder<T> builder = newInstance(operation); builder.getQueryTerms().add(new ValueSharedPartIndexTerm(sharedPartName, type, searchType)); return builder; }
public static RefactorOperationBuilder<QueryOperationRequest>.PossiblyRequiresPart references( String fullyQualifiedResourceName, ResourceType type, TermSearchType searchType) { RefactorOperationBuilder<QueryOperationRequest> builder = RefactorOperationBuilderFactory.newResourceBasedInstance( fullyQualifiedResourceName, type, OperationType.QUERY); return builder.possiblyRequiresPart(builder); }
public static RefactorOperationBuilder<QueryOperationRequest>.RequiresModule referencesSharedPart( String fullyQualifiedPartName, PartType partType) { RefactorOperationBuilder<QueryOperationRequest> builder = RefactorOperationBuilderFactory.newSharedPartBasedInstance( fullyQualifiedPartName, partType, OperationType.QUERY); return builder.requiresModule(builder); }
public static RefactorOperationBuilder<RefactorOperationRequest>.RequiresModule refactorPartReferences( String fullyQualifiedResourceName, String partName, PartType partType, String partNewName) { RefactorOperationBuilder<RefactorOperationRequest> builder = RefactorOperationBuilderFactory.newResourcePartBasedInstance( fullyQualifiedResourceName, partName, partType, partNewName, OperationType.REFACTOR); return builder.requiresModule(builder); } }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newResourcePartBasedInstance( String resourceName, String partName, PartType partType, String newPartName, OperationType operation) { // OCRAM: check that part type is NOT a shared-part type RefactorOperationBuilder<T> builder = newInstance(operation); // TODO: info for new name?? return builder; }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newResourceBasedInstance( String resourceName, ResourceType type, OperationType operation) { RefactorOperationBuilder<T> builder = newInstance(operation); builder.getQueryTerms().add(new ValueReferenceIndexTerm(resourceName, type)); return builder; }
public static RefactorOperationBuilder<DeleteOperationRequest>.PossiblyRequiresPart deleteReferences( String fullyQualifiedResourceName, ResourceType type ) { RefactorOperationBuilder<DeleteOperationRequest> builder = RefactorOperationBuilderFactory.newResourceBasedInstance( fullyQualifiedResourceName, type, OperationType.DELETE); return builder.possiblyRequiresPart(builder); }
public static <T extends AbstractOperationRequest> RefactorOperationBuilder<T> newResourcePartBasedInstance( String resourceName, String partName, PartType partType, TermSearchType searchType, OperationType operation) { // OCRAM: check that part type is NOT a shared-part type RefactorOperationBuilder<T> builder = newInstance(operation); builder.getQueryTerms().add(new ValuePartReferenceIndexTerm(resourceName, partName, partType, searchType)); return builder; }