This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def procBuilder = new ProcessBuilder('convert', | |
"-resize", "${width}x${height}", "-crop", "${x1}+${y1}+${x2}+${y2}", | |
'/path/to/file', '/path/to/result/file') | |
def proc = procBuilder.start() // run script | |
//Wait until done... | |
proc.waitFor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
burningImageService.doWith('path/to/my/file', 'path/to/output/dir').execute { | |
it.crop(x,y,x1,y1) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
burningImageService.doWith(file, resultDir) execute { | |
outputFileName = it.scaleApproximate(x, y) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AuditLogEvent implements Serializable { | |
private static final long serialVersionUID = 1L | |
Object id // id can be configured type since 1.0.4 (depending on mapping config) | |
static auditable = false | |
Date dateCreated | |
Date lastUpdated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auditLog { | |
logIds = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User { | |
static auditable = [ignore: ['version', 'lastUpdated', 'username', 'password']] | |
String username | |
String password | |
String phoneNumber | |
String city | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User { | |
String username | |
String password | |
String phoneNumber | |
String city | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def purchaseFlow = { | |
init { | |
action { | |
if (params.productId) { | |
Product product = Product.get(params.productId) | |
if (product) { | |
flow.purchasedProduct = new PurchasedProduct(product: product, buyer: new Buyer()) | |
} else { | |
return fail() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PurchasedProduct { | |
Product product | |
Buyer buyer | |
Integer count | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product { | |
String title | |
String description | |
Long price | |
String currencyCode | |
static mapping = { | |
description type: 'text' | |
} | |
} |
NewerOlder