public void createOrUpdateTypeOnDisk(final ClassOrInterfaceTypeDetails cid) { final String fileCanonicalPath = typeLocationService.getPhysicalTypeCanonicalPath(cid.getDeclaredByMetadataId()); String newContents; File file; boolean existsFile = false; if (fileCanonicalPath != null) { file = new File(fileCanonicalPath); existsFile = file.exists() && file.isFile(); } if (existsFile) { newContents = typeParsingService.updateAndGetCompilationUnitContents(fileCanonicalPath, cid); } else { newContents = typeParsingService.getCompilationUnitContents(cid); } fileManager.createOrUpdateTextFileIfRequired(fileCanonicalPath, newContents, true); }
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final JpaEntityFactoryAnnotationValues annotationValues = new JpaEntityFactoryAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final EntityProjectionAnnotationValues annotationValues = new EntityProjectionAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final RepositoryJpaAnnotationValues annotationValues = new RepositoryJpaAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
"Metadata id '%s' is not valid for this metadata provider", metadataIdentificationString); final String canonicalPath = typeLocationService.getPhysicalTypeCanonicalPath(metadataIdentificationString); if (StringUtils.isBlank(canonicalPath)) { return null;
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { if (RooJavaType.ROO_SERVICE.equals(context)) { final ServiceAnnotationValues annotationValues = new ServiceAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); } if (RooJavaType.ROO_SERVICE_IMPL.equals(context)) { final ServiceImplAnnotationValues annotationValues = new ServiceImplAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getService() != null && annotationValues.getService().equals(key); } return false; }
getPathResolver().getPath(detailController.getModule(), Path.SRC_MAIN_JAVA); final String resourceIdentifierItem = getTypeLocationService().getPhysicalTypeCanonicalPath(detailController, detailControllerPathItem); final String declaredByMetadataId =
getPathResolver().getPath(mainController.getModule(), Path.SRC_MAIN_JAVA); final String resourceIdentifier = getTypeLocationService().getPhysicalTypeCanonicalPath(mainController, controllerPath); final String declaredByMetadataId = PhysicalTypeIdentifier.createIdentifier(mainController,
getTypeLocationService().getPhysicalTypeCanonicalPath(mixinClass, mixinPath); final String declaredByMetadataIdItem = PhysicalTypeIdentifier.createIdentifier(mixinClass,
getPathResolver().getPath(collectionController.getModule(), Path.SRC_MAIN_JAVA); final String resourceIdentifier = getTypeLocationService().getPhysicalTypeCanonicalPath(collectionController, controllerPath); final String declaredByMetadataId = getPathResolver().getPath(itemController.getModule(), Path.SRC_MAIN_JAVA); final String resourceIdentifierItem = getTypeLocationService().getPhysicalTypeCanonicalPath(itemController, controllerPathItem); final String declaredByMetadataIdItem = PhysicalTypeIdentifier.createIdentifier(itemController,
getTypeLocationService().getPhysicalTypeCanonicalPath(deserializerClass, deserializerPath); final String declaredByMetadataIdItem =
public void createOrUpdateTypeOnDisk(final ClassOrInterfaceTypeDetails cid) { final String fileCanonicalPath = typeLocationService.getPhysicalTypeCanonicalPath(cid.getDeclaredByMetadataId()); String newContents; File file; boolean existsFile = false; if (fileCanonicalPath != null) { file = new File(fileCanonicalPath); existsFile = file.exists() && file.isFile(); } if (existsFile) { newContents = typeParsingService.updateAndGetCompilationUnitContents(fileCanonicalPath, cid); } else { newContents = typeParsingService.getCompilationUnitContents(cid); } fileManager.createOrUpdateTextFileIfRequired(fileCanonicalPath, newContents, true); }
File targetFile = new File( typeLocationService .getPhysicalTypeCanonicalPath(declaredByMetadataId)); if (targetFile.exists()) { if (failIfAlreadySet) {
File targetFile = new File( typeLocationService .getPhysicalTypeCanonicalPath(declaredByMetadataId)); if (targetFile.exists()) { Validate.isTrue(!targetFile.exists(), "Type '%s' already exists",
File targetFile = new File( typeLocationService .getPhysicalTypeCanonicalPath(declaredByMetadataId)); Validate.isTrue(!targetFile.exists(), "Type '%s' already exists", target);
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final RepositoryJpaAnnotationValues annotationValues = new RepositoryJpaAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final JpaEntityFactoryAnnotationValues annotationValues = new JpaEntityFactoryAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
@Override public boolean evaluateForKey(JavaType key, ClassOrInterfaceTypeDetails valueToEvalueate, JavaType context) { final EntityProjectionAnnotationValues annotationValues = new EntityProjectionAnnotationValues(new DefaultPhysicalTypeMetadata( valueToEvalueate.getDeclaredByMetadataId(), typeLocationService.getPhysicalTypeCanonicalPath(valueToEvalueate .getDeclaredByMetadataId()), valueToEvalueate)); return annotationValues.getEntity() != null && annotationValues.getEntity().equals(key); }
getPathResolver().getPath(mainController.getModule(), Path.SRC_MAIN_JAVA); final String resourceIdentifier = getTypeLocationService().getPhysicalTypeCanonicalPath(mainController, controllerPath); final String declaredByMetadataId = PhysicalTypeIdentifier.createIdentifier(mainController,