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
case class Article(id: Option[Long] = None, | |
name: String, | |
body: Option[String], // this is the body in edit | |
userID: Long, | |
created: Date, | |
category: String, | |
published: Boolean = false, | |
displayOrder: Int = -1, | |
publishedBody: Option[String] // body as published | |
) |
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
import play.api.db._ | |
import play.api.Play.current | |
import java.sql.Date | |
import scala.slick.driver.PostgresDriver.simple._ | |
import play.Logger | |
import scalaz.Failure | |
import scala.slick.lifted.Projection | |
import Users._ | |
import scala.slick.lifted.BaseTypeMapper | |
import scala.slick.driver.BasicProfile |
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
/** | |
* Service Backbone save(); | |
* @param id | |
*/ | |
public void create(){ | |
JSONDeserializer<Athelete>reportDeserializer = new JSONDeserializer<Athelete>().use( null, Athelete.class ); | |
String json = params.get("body"); | |
Athelete athelete = reportDeserializer.deserialize(json); | |
athelete.save(); |
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
//Contents of js/nls/atheleteLabel.js | |
define({ | |
'root': { | |
NAME : 'Name', | |
... | |
}, | |
'fr-fr': 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
//Contents of js/nls/fr/atheleteLabel.js | |
define({ | |
NAME : 'Nom', | |
... | |
}); | |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone', | |
'text!templates/athelete/atheleteForm.html' | |
'i18n!nls/atheleteLabel' | |
], function($, _, Backbone, atheleteForm, atheleteLabel ){ | |
var AtheleteForm = Backbone.View.extend({ | |
el: "#athleteForm", |
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
IO(Http) ? Http.Bind(service, interface = ip, port = port) | |
logger.info(s"MicroserviceMain booting ip:$ip port:$port") | |
StatusService.signalStartedOrExit() |
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
BundleKeys.system := "SomeAkkaClusterSystem" |
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
sys.env.get("SINGLEMICRO_BIND_IP") |
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
BundleKeys.startCommand += "-Dhttp.address=$SINGLEMICRO_BIND_IP -Dhttp.port=$SINGLEMICRO_BIND_PORT" |