Skip to content

Commit

Permalink
[#1493] Done on i18n of docviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeike443 committed Jun 10, 2012
1 parent e06ec08 commit 576f922
Show file tree
Hide file tree
Showing 97 changed files with 15,179 additions and 179 deletions.
@@ -0,0 +1,82 @@
h2. Command line - play command

*classpath*
算出されたクラスパスを表示します。

*id*
複数環境設定用のフレームワーク ID を定義します。

*secret*
暗号化に使われる秘密鍵を生成します。

*install*
モジュールをインストールします。

*list-modules*
セントラルモジュールリポジトリから入手可能なモジュールを列挙します。

*modules*
算出されたモジュールのリストを表示します。

*new*
新しいアプリケーションを作成します。

*new-module*
モジュールを作成します。

*build-module*
モジュールをビルドし、パッケージングします。

*eclipsify*
Eclipse の全ての設定ファイルを作成します。

*netbeansify*
NetBeans の全ての設定ファイルを作成します。

*idealize*
IntelliJ Idea の全ての設定ファイルを作成します。

*javadoc*
アプリケーションの Javadoc を生成します。

*auto-test*
全てのアプリケーションのテストを自動的に実行します。

*clean*
(バイトコードキャッシュを含む) 一時ファイルを削除します。

*test*
現在のシェルでアプリケーションをテストモードで実行します。

*precompile*
アプリケーションの起動を高速化するため全ての Java のソースとテンプレートをプリコンパイルします。

*war*
スタンドアロンの WAR アーカイブとしてアプリケーションをエクスポートします。

*run*
現在のシェルでアプリケーションを実行します。

*start*
バックグラウンドでアプリケーションを起動します。

*stop*
実行中のアプリケーションを停止します。

*restart*
実行中のアプリケーションを再起動します。

*status*
実行中のアプリケーションの状態を表示します。

*out*
logs/system.out ファイルの内容をリアルタイムで表示します。

*pid*
実行中のアプリケーションの PID を表示します。

*check*
現在のものより新しい Play framework のリリースがあるかどうかチェックします。

*help*
指定したコマンドのヘルプを表示します。
@@ -0,0 +1,27 @@
h2. Controller.action - Smart binding

*==Controller/link?i=32&n=patrick==*
==public static void link(int i, String n)==
==public static void link(Integer i, String n)==
==public static void link(Long i, String n)==

*==Controller/show?id[0]=1&id[1]=2&id[2]=3&id[3]=4==*
==public static void show(Long[] id)==
==public static void show(List<Long> id)==
==public static void show(Set<Long> id)==

*==Controller/get?date=02-18-1972==*
==public static void get(@As("MM-dd-yyyy") Date date)==

*==(@As(binder=MyCustomStringBinder.class))==*
Custom parameter binder

*public static void create(String comment, File attachment)*
multipart/form-data エンコードの POST リクエストとしてファイルを送信します。

*==?client.name=paul&client.email=p@example.com==*
*public static void create(Client client)*
JavaBean (POJO) binding

*@NoBinding*
バインドできないフィールドを示します。
@@ -0,0 +1,27 @@
h2. Controller.action - Validation

*==@Required String lastname==*
*==@IsTrue String agree==*
*==@Max(7500) Integer wordCount==*
*==@Min(18) Long age==*
*==@MaxSize(2083) String value==*
*==@MinSize(42) String value==*
*==@Email String address==*
*==@Equals("passwordConfirmation") String password==*
*==@InFuture String dueDate==*
*==@InFuture("1979-12-31") String birthDate==*
*==@Match("[A-Z]{3}") String abbreviation==*
*==@Match("(directDebit|creditCard|onReceipt)")==*
*==@Past String actualDepartureDate==*
*==@Past("1980-01-01") String birthDate==*
*==@Range(min = 17500, max = 40000) String wordCount==*
*==@URL String address==*
*==@IPv4Address String ip==*
*==@IPv6Address String ip==*

*==@Phone String phone==*
Relaxed phone validation
電話番号の緩やかな検証

*==@Valid Person person==*
JavaBean (POJO) 検証 - Person クラスは検証のアノテーションが必要です。
@@ -0,0 +1,27 @@
h2. Controller - Session Management

*警告: Play のセッションは J2EE のセッションではありません*
session と flash はクッキーを使います! 4KB と 20 個の上限があります。

*session.getId();*
(たいていの場合持っておかなければいけない) セッション ID を返します。

*session.put(String key, String value);*
*session.get("user_flag");*
値は 4KB を上限とする文字列に限られます。

*flash.put(String key, String value);*
*flash.get(String key);*
flash エントリは次のリクエストの終了まで廃棄されます。

*Cache.set("key_" + id, product, "30mn");*
30 分のキャッシュ値をセットします。

*Cache.get("key_" + id, Product.class);*
キャッシュ値を取得します。キーに対応する値がなければ null を返します。

*Cache.delete("key_" + id);*
ノンブロッキングのキャッシュ削除

*Cache.safeDelete("key_" + id);*
ブロッキングのキャッシュ削除
@@ -0,0 +1,22 @@
h2. Controller.action - Redirection

*render(params...);*
与えられたパラメータでテンプレートを text/html としてレンダリングします。

*renderXML(params...);*
パラメータを application/xml としてレンダリングします。

*renderJson(params...);*
パラメータを application/json としてレンダリングします。

*renderText(params...);*
パラメータを text/plain としてレンダリングします。

*renderTemplate("Clients/showClient.html", id, client);*
デフォルトのテンプレートをバイパスします。

*redirect("http://www.crionics.com");*
指定された URL に HTTP リダイレクトします。

*From an action, calling another Controller.action()*
透過的にリダイレクトを生成します。
@@ -0,0 +1,12 @@
h2. Controller - Jobs

*==@OnApplicationStart==*

*==@On("0 0 12 &lowast; &lowast; ?")==*
毎日午後 12:01

*==@On("10 30 12 ? &lowast; MON-FRI")==*
平日の午後 12:30:10

*==@Every("1h")==*
*==public class Bootstrap extends Job {public void doJob() {...} }==*
@@ -0,0 +1,18 @@
h2. Controller - Interceptions

*==@Before ➟ action ➟ @After ➟ template ➟ @Finally==*
Interceptions evaluation order
インターセプト評価の順

*==@Before static void checkAuthentification()==*
*==@After static void log()==*
*==@Finally static void audit()==*
You get the idea

*==@With(Secure.class)==*
*==public class Admin extends Application==*
コントローラスコープでのカスタムインターセプタ

*==@Catch(value={RuntimeException.class})==*
*public static void onException(RuntimeException e) {…}*
コントローラ層での例外ハンドリング
@@ -0,0 +1,15 @@
h2. Controller.action - Others

*==Logger.info("Action executed ...");==*
*==Logger.debug("A log message");==*
*==Logger.error(ex, "Oops");==*
ロギングの設定は application.conf にあります。

*==@CacheFor("1h") public static void index() { ... }==*
1時間アクションの実行結果をキャッシュします。

*==Play.configuration.getProperty("blog.title");==*
設定ファイルにアクセスします。

*==Query query = JPA.em().createQuery("query");==*
永続化マネージャにアクセスします。
@@ -0,0 +1,64 @@
h2. Controller - Libraries

*==WS.url("http://s.com/posts").get().toJSON();==*
HTTP GET リクエストを JSON にします。

*==WS.withEncoding("iso-8859-1").url("http://s.com/posts").get().toJSON();==*
HTTP GET リクエストを iso-8859-1 エンコーディングで JSON にします。

*==WS.url("http://s.com/").post().toXML();==*
HTTP POST リクエストを XML にします。

*==DB.execute("raw sql");==*
そのままの SQL を評価します。

*==XML.getDocument(String);==*
文字列を XML にします。

*==XML.serialize(Document);==*
XML を文字列にします。

*==XPath.selectNodes(String xpath, Object node);==*
XPath 表記の評価

*==Files.copy(File,File);==*
ファイルコピー

*==Files.copyDir(File,File);==*
再帰的なディレクトリコピー

*==Files.delete(File);==*
*==Files.deleteDirectory(File);==*
ファイルやディレクトリの削除

*==IO.readLines(File);==*
*==IO.readContentAsString(File);==*
*==IO.readContent(File);==*
*==IO.write(byte[],File);==*
ファイルの内容の読み書き

*==Images.crop(File orig,File to, int x1, int y1, int x2, int y2);==*
*==Images.resize(File orig, File to, int w, int h);==*
*==Images.toBase64(File image);==*
便利なメソッド

*==Crypto.encryptAES(String);==*
*==Crypto.decryptAES(String);==*
アプリケーションの秘密鍵を使っての暗号化

*==Crypto.passwordHash(String);==*
MD5 パスワードハッシュを生成します。

*==Codec.UUID();==*
ユニークな ID を生成します。

*==Codec.byteToHexString(byte[] bytes);==*
バイト配列を 16進数表記の文字列で書き出します。

*==Codec.encodeBASE64(byte[] value);==*
*==Codec.decodeBASE64(String base64);==*
Encode/Decode a base64 value
base64 のエンコードまたはデコードをします。

*==Codec.hexSHA1(String);==*
文字列の 16進数表記の SHA1 ハッシュを生成します。
32 changes: 32 additions & 0 deletions documentation/cheatsheets_ja/model/ch14-ModelActionQueries.textile
@@ -0,0 +1,32 @@
h2. Model.action - Queries

*==Query query = JPA.em().createQuery("jpql_query");==*
永続化マネージャにアクセスします。

*==Post post = Post.findById(id);==*
*==List<Post> posts = Post.findAll();==*
find メソッド

*==post.save();==*
永続化層にオブジェクトを保存します。

*==boolean post.validateAndSave();==*
オブジェクトを検証して保存した場合に true を返します。検証はアノテーションで行われます。

*==List<Post> posts = Post.all().from(50).fetch(100);==*
50 番目から 100 番目のレコードを読み込みます。

*==Post.find("select p from Post p, Comment c where c.post==*
*=== p and c.subject like ?", "%hop%");==*
ジョインを使ったパラメタ化された参照

*==long userCount = Post.count("author=?", connectedUser);==*
*==long postCount = Post.count();==*
レコードをカウントします。

*==JPAPlugin.startTx(boolean readonly);==*
*==JPAPlugin.closeTx(boolean rollback);==*
トランザクションを独自で制御するメソッド

*==JPA.setRollbackOnly();==*
トランザクションを強制的にロールバックします。
16 changes: 16 additions & 0 deletions documentation/cheatsheets_ja/model/ch15-ModelBasics.textile
@@ -0,0 +1,16 @@
h2. Model - Basics

*==@Entity(name="sql_tbl") public class Post extends Model==*
当該クラスが永続的なものであることを指定します。

*==@Embedded==*
このフィールドが埋め込まれたものであることを定義します。

*==@EmbeddedId==*
このフィールドが当該クラスの ID であり、埋め込まれたものであることを定義します。

*==@Embeddable==*
当該クラスが他の永続的クラスに永続的に埋め込まれることを指定します。

*==@MappedSuperclass==*
このクラスがサブクラスにマッピングされるための永続的な情報を持っていることを指定します。
11 changes: 11 additions & 0 deletions documentation/cheatsheets_ja/model/ch16-ModelGenerators.textile
@@ -0,0 +1,11 @@
h2. Model - Generators

*==@GeneratedValue(strategy = [NONE, TABLE, SEQUENCE,==*
*==IDENTITY, AUTO])==*
インデックスの自動生成に使用します。

*==@SequenceGenerator==*
永続的なエンティティに使用するデータストア内のシーケンスを使った値のジェネレータを定義します。

*==@TableGenerator==*
永続的なエンティティに使用するデータストア内のテーブルを使ったシーケンスのジェネレータを定義します。
@@ -0,0 +1,31 @@
h2. Model - Relational mapping

*==@Table(name="sql_tbl", catalog="", schema="")==*
このクラスが保存されるテーブルを定義します。

*==@Id==*
ID となるフィールドを定義します。

*==@Version==*
バージョンを保持しているフィールドを定義します。

*==@Basic==*
永続的なフィールドを定義します。省略可能です。

*==@Transient==*
(永続的でない) 一時的なフィールドを定義します。

*==@Lob(fetch=[LAZY, EAGER], type=[BLOB,CLOB])==*
ラージオブジェクトとして保存されるフィールドを定義します。

*==@UniqueConstraint(primary=false, String columns[])==*
セカンダリインデックスを定義します。

*==@Temporal(DATE,TIME,TIMESTAMP)==*
java.util.Date や Calendar 型のフィールドにだけ使われるべきです。

*==@Enumerated(ORDINAL, STRING)==*
列挙型のクラスを保持するフィールドを定義します。

*==@Column(name="sql_column_name")==*
フィールド名と異なるテーブルのカラム名を定義します。

0 comments on commit 576f922

Please sign in to comment.