[pal-cvs 3735] [1470] refactoring, i18ned, fixed multithread issue.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 11月 28日 (金) 17:10:16 JST


Revision: 1470
          http://svn.sourceforge.jp/view?root=pal&view=rev&rev=1470
Author:   shinsuke
Date:     2008-11-28 17:10:16 +0900 (Fri, 28 Nov 2008)

Log Message:
-----------
refactoring, i18ned, fixed multithread issue.

Modified Paths:
--------------
    chat/trunk/.settings/org.eclipse.jdt.core.prefs
    chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatAction.java
    chat/trunk/src/main/java/jp/sf/pal/chat/form/ChatForm.java
    chat/trunk/src/main/resources/application.properties
    chat/trunk/src/main/resources/application_ja.properties
    chat/trunk/src/main/webapp/WEB-INF/portlet.xml
    chat/trunk/src/main/webapp/WEB-INF/view/chat/index.jsp

Added Paths:
-----------
    chat/trunk/.settings/org.eclipse.jdt.ui.prefs
    chat/trunk/src/main/java/jp/sf/pal/chat/ChatConstants.java
    chat/trunk/src/main/java/jp/sf/pal/chat/common/
    chat/trunk/src/main/java/jp/sf/pal/chat/common/util/
    chat/trunk/src/main/java/jp/sf/pal/chat/common/util/SAStrutsUtil.java
    chat/trunk/src/main/java/jp/sf/pal/chat/entity/
    chat/trunk/src/main/java/jp/sf/pal/chat/entity/ChatData.java
    chat/trunk/src/main/java/jp/sf/pal/chat/util/
    chat/trunk/src/main/java/jp/sf/pal/chat/util/ChatUtil.java

Removed Paths:
-------------
    chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatConstants.java
    chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatLog.java
    chat/trunk/src/main/java/jp/sf/pal/chat/action/IndexAction.java
    chat/trunk/src/main/webapp/WEB-INF/view/index.jsp


-------------- next part --------------
Modified: chat/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- chat/trunk/.settings/org.eclipse.jdt.core.prefs	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/.settings/org.eclipse.jdt.core.prefs	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,5 +1,261 @@
-#Thu Nov 20 08:56:15 JST 2008
+#Fri Nov 28 14:42:08 JST 2008
+eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=true
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

Added: chat/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- chat/trunk/.settings/org.eclipse.jdt.ui.prefs	                        (rev 0)
+++ chat/trunk/.settings/org.eclipse.jdt.ui.prefs	2008-11-28 08:10:16 UTC (rev 1470)
@@ -0,0 +1,4 @@
+#Fri Nov 28 14:42:08 JST 2008
+eclipse.preferences.version=1
+formatter_profile=_PAL Project
+formatter_settings_version=11

Added: chat/trunk/src/main/java/jp/sf/pal/chat/ChatConstants.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/ChatConstants.java	                        (rev 0)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/ChatConstants.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -0,0 +1,19 @@
+package jp.sf.pal.chat;
+
+public class ChatConstants {
+
+    public static final String PREFIX = "jp.sf.pal.chat";
+
+    public static final String LOG_ATTRIBUTE_NAME = PREFIX + ".log";
+
+    public static final String LAST_SAVED = PREFIX + ".last_saved";
+
+    public static final String DEFAULT_FILE_DIR = "/WEB-INF/chatlog/";
+
+    public static final String DEFAULT_SCOPE = "default";
+
+    public static final int DEFAULT_SHOW_NUM = 10;
+
+    public static final long SAVE_INTERVAL = 5L * 60L * 1000L;
+
+}


Property changes on: chat/trunk/src/main/java/jp/sf/pal/chat/ChatConstants.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatAction.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatAction.java	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatAction.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,74 +1,113 @@
 /*
- * Copyright 2004-2008 the Seasar Foundation and the Others.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
+ * Copyright 2004-2008 the Seasar Foundation and the Others. Licensed under the
+ * Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
  * governing permissions and limitations under the License.
  */
 package jp.sf.pal.chat.action;
 
+import java.io.Serializable;
 import java.text.DateFormat;
+import java.text.MessageFormat;
 import java.util.Date;
 import java.util.LinkedList;
+import java.util.Locale;
+import java.util.ResourceBundle;
 
 import javax.annotation.Resource;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 
+import jp.sf.pal.chat.ChatConstants;
+import jp.sf.pal.chat.common.util.SAStrutsUtil;
+import jp.sf.pal.chat.entity.ChatData;
 import jp.sf.pal.chat.form.ChatForm;
+import jp.sf.pal.chat.util.ChatUtil;
 
 import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang.StringUtils;
+import org.seasar.framework.container.hotdeploy.HotdeployUtil;
 import org.seasar.struts.annotation.ActionForm;
 import org.seasar.struts.annotation.Execute;
 import org.seasar.struts.util.ResponseUtil;
 
-public class ChatAction {
-	@Resource
-	@ActionForm
-	protected ChatForm chatForm;
+public class ChatAction implements Serializable {
 
-	protected ChatLog chatLog = new ChatLog();
+    private static final long serialVersionUID = -2040143852151855076L;
 
-	public ServletContext context;
-	public HttpServletRequest request;
+    @Resource
+    @ActionForm
+    protected ChatForm chatForm;
 
-	@Execute(validator = false)
-	public String index() {
-		return "index.jsp";
-	}
+    public transient ServletContext context;
 
-	@Execute(validator = false)
-	public String chat() {
-		Date date = new Date();
-		String d = DateFormat.getInstance().format(date);
-		String name = chatForm.name;
-		String msg = StringEscapeUtils.escapeHtml(chatForm.msg);
-		chatLog.loadLog(context);
-		chatLog.add((name + ": " + msg + " (" + d + ")"), context);
-		loadChat();
-		return null;
-	}
+    public transient HttpServletRequest request;
 
-	@Execute(validator = false)
-	public String loadChat() {
-		LinkedList<String> dataList = chatLog.loadLog(context);
-		if (dataList != null && dataList.size() != 0) {
-			StringBuffer buffer = new StringBuffer("");
-			for(int i=0; (i < ChatConstants.DEFAULT_SHOW_NUM && i < dataList.size()) ;i++){
-				buffer.append("<br />");
-				buffer.append(dataList.get(i));
-			}
-			ResponseUtil.write(buffer.toString());
-		}
-		return null;
-	}
+    @Execute(validator = false)
+    public String index() {
+        chatForm.nameArg0 = SAStrutsUtil.getUserInfo(request,
+                "user.name.given", "");
+        chatForm.nameArg1 = SAStrutsUtil.getUserInfo(request,
+                "user.name.family", "");
+        chatForm.nameArg2 = SAStrutsUtil.getUserInfo(request,
+                "user.name.middle", "");
+        if (StringUtils.isEmpty(chatForm.nameArg0)
+                && StringUtils.isEmpty(chatForm.nameArg1)
+                && StringUtils.isEmpty(chatForm.nameArg2)) {
+            chatForm.nameArg0 = SAStrutsUtil.getUserInfo(request,
+                    "user.name.nickName", "");
+            if (StringUtils.isEmpty(chatForm.nameArg0)) {
+                chatForm.nameArg0 = request.getRemoteUser();
+            }
+        }
+        return "index.jsp";
+    }
 
+    @Execute(validator = false)
+    public String chat() {
+        if (!StringUtils.isEmpty(chatForm.msg)) {
+            String msg = StringEscapeUtils.escapeHtml(chatForm.msg);
+            ChatUtil.add(ChatConstants.DEFAULT_SCOPE, chatForm.nameArg0,
+                    chatForm.nameArg1, chatForm.nameArg2, msg, new Date(),
+                    ChatConstants.DEFAULT_SHOW_NUM, context);
+        }
+        loadChat();
+        return null;
+    }
+
+    @Execute(validator = false)
+    public String loadChat() {
+        Locale locale = request.getLocale();
+        ResourceBundle bundle = ResourceBundle.getBundle("application", locale);
+        MessageFormat nameFormat = new MessageFormat(bundle
+                .getString("display.name"));
+        DateFormat dateFormat = DateFormat.getDateTimeInstance(
+                DateFormat.SHORT, DateFormat.SHORT, locale);
+
+        LinkedList<ChatData> dataList = ChatUtil.getChatLogList(context,
+                ChatConstants.DEFAULT_SCOPE);
+        if (dataList != null && !dataList.isEmpty()) {
+            StringBuilder buf = new StringBuilder("<table border=\"0\">");
+            dataList = (LinkedList<ChatData>) HotdeployUtil
+                    .rebuildValue(dataList);
+            for (ChatData chatData : dataList) {
+                buf.append("<tr><td style=\"text-align:right;\">");
+                buf.append(nameFormat.format(new Object[] {
+                        chatData.getNameArg0(), chatData.getNameArg1(),
+                        chatData.getNameArg2() }));
+                buf.append(":</td><td>");
+                buf.append(chatData.getMsg());
+                buf.append(" (");
+                buf.append(dateFormat.format(chatData.getDate()));
+                buf.append(")</td></tr>");
+            }
+            buf.append("</table>");
+            ResponseUtil.write(buf.toString());
+        }
+        return null;
+    }
 }

Deleted: chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatConstants.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatConstants.java	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatConstants.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,13 +0,0 @@
-package jp.sf.pal.chat.action;
-
-public class ChatConstants {
-	
-	public static final String PREFIX = "jp.sf.pal.chat";
-	public static final String LOG_ATTRIBUTE_NAME = PREFIX + ".log";
-	public static final String LAST_SAVED = PREFIX + ".last_saved";
-    public static final String DEFAULT_FILE_DIR = "/WEB-INF/chatlog";
-    public static final String CHAT_LOG_FILE = DEFAULT_FILE_DIR + "/log";
-    public static final int DEFAULT_SHOW_NUM = 10;
-    public static final long SAVE_INTERVAL = 5 * 60 * 1000; 
-	
-}

Deleted: chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatLog.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatLog.java	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/action/ChatLog.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,76 +0,0 @@
-package jp.sf.pal.chat.action;
-
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Date;
-import java.util.LinkedList;
-
-import javax.servlet.ServletContext;
-
-public class ChatLog {
-
-	private LinkedList<String> chatLogList;
-
-	public ChatLog() {
-		this.chatLogList = new LinkedList<String>();
-	}
-
-	public synchronized LinkedList<String> add(String msg, ServletContext context) {
-		loadLog(context);
-		chatLogList.addFirst(msg);
-		saveLog(context);
-		return chatLogList;
-	}
-
-	public synchronized LinkedList<String> loadLog(ServletContext context) {
-		chatLogList = (LinkedList<String>) context
-				.getAttribute(ChatConstants.LOG_ATTRIBUTE_NAME);
-		if (chatLogList == null) {
-			try {
-				fileLoad(context);
-			} catch (Exception e) {
-				chatLogList = new LinkedList<String>();
-			}
-		}
-		return (LinkedList<String>)chatLogList.clone();
-	}
-
-	private void saveLog(ServletContext context) {
-		context.setAttribute(ChatConstants.LOG_ATTRIBUTE_NAME, chatLogList);
-		Long last_saved = Long.decode("0");
-		if (context.getAttribute(ChatConstants.LAST_SAVED) != null) {
-			last_saved = Long.decode((String)context.getAttribute(ChatConstants.LAST_SAVED));
-		}
-		long now = new Date().getTime();
-		if ((now - last_saved.longValue()) > ChatConstants.SAVE_INTERVAL) {
-			try {
-				fileSave(context);
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-			context.setAttribute(ChatConstants.LAST_SAVED, Long.valueOf(now).toString());
-		}
-	}
-
-	private void fileSave(ServletContext context) throws Exception {
-		FileOutputStream fileOutputStream = new FileOutputStream(context
-				.getRealPath(ChatConstants.CHAT_LOG_FILE));
-		ObjectOutputStream objectOutputStream = new ObjectOutputStream(
-				fileOutputStream);
-		objectOutputStream.writeObject(chatLogList);
-		objectOutputStream.close();
-		fileOutputStream.close();
-	}
-
-	private void fileLoad(ServletContext context) throws Exception {
-		FileInputStream fileInputStream = new FileInputStream(context
-				.getRealPath(ChatConstants.CHAT_LOG_FILE));
-		ObjectInputStream objectInputStream = new ObjectInputStream(
-				fileInputStream);
-		chatLogList = (LinkedList<String>) objectInputStream.readObject();
-		fileInputStream.close();
-		objectInputStream.close();
-	}
-}

Deleted: chat/trunk/src/main/java/jp/sf/pal/chat/action/IndexAction.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/action/IndexAction.java	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/action/IndexAction.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,26 +0,0 @@
-/*
- * Copyright 2004-2008 the Seasar Foundation and the Others.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package jp.sf.pal.chat.action;
-
-import org.seasar.struts.annotation.Execute;
-
-public class IndexAction {
-	
-    @Execute(validator = false)
-	public String index() {
-        return "index.jsp";
-	}
-}

Added: chat/trunk/src/main/java/jp/sf/pal/chat/common/util/SAStrutsUtil.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/common/util/SAStrutsUtil.java	                        (rev 0)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/common/util/SAStrutsUtil.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -0,0 +1,86 @@
+package jp.sf.pal.chat.common.util;
+
+import java.util.Map;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
+import org.seasar.struts.portlet.util.PortletUtil;
+import org.seasar.struts.util.ActionMessagesUtil;
+
+public class SAStrutsUtil {
+
+    public static PortletRequest getPortletRequest(HttpServletRequest request) {
+        PortletRequest portletRequest = (PortletRequest) request
+                .getAttribute(PortletUtil.PORTLET_REQUEST);
+        if (portletRequest != null) {
+            return portletRequest;
+        }
+        return null;
+    }
+
+    public static PortletConfig getPortletConfig(HttpServletRequest request) {
+        PortletConfig portletConfig = (PortletConfig) request
+                .getAttribute(PortletUtil.PORTLET_CONFIG);
+        if (portletConfig != null) {
+            return portletConfig;
+        }
+        return null;
+    }
+
+    public static PortletContext getPortletContext(HttpServletRequest request) {
+        PortletConfig portletConfig = (PortletConfig) request
+                .getAttribute(PortletUtil.PORTLET_CONFIG);
+        if (portletConfig != null) {
+            return portletConfig.getPortletContext();
+        }
+        return null;
+    }
+
+    public static String getRealPath(HttpServletRequest request, String path) {
+        PortletContext portletContext = getPortletContext(request);
+        if (portletContext != null) {
+            return portletContext.getRealPath(path);
+        }
+        return path;
+    }
+
+    public static PortletSession getPortletSession(HttpServletRequest request) {
+        PortletRequest portletRequest = (PortletRequest) request
+                .getAttribute(PortletUtil.PORTLET_REQUEST);
+        if (portletRequest != null) {
+            return portletRequest.getPortletSession();
+        }
+        return null;
+    }
+
+    public static void addMessage(HttpServletRequest request, String key) {
+        ActionMessages msgs = new ActionMessages();
+        msgs.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(key));
+        ActionMessagesUtil.saveMessages(request, msgs);
+    }
+
+    public static String getRequestParameter(HttpServletRequest request,
+            String key) {
+        PortletRequest portletRequest = (PortletRequest) request
+                .getAttribute(PortletUtil.PORTLET_REQUEST);
+        if (portletRequest != null) {
+            return portletRequest.getParameter(key);
+        }
+        return null;
+    }
+
+    public static String getUserInfo(HttpServletRequest request, String key,
+            String defaultValue) {
+        Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
+        String value = (userInfo != null) ? (String) userInfo.get(key)
+                : defaultValue;
+        return value != null ? value : defaultValue;
+    }
+
+}


Property changes on: chat/trunk/src/main/java/jp/sf/pal/chat/common/util/SAStrutsUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: chat/trunk/src/main/java/jp/sf/pal/chat/entity/ChatData.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/entity/ChatData.java	                        (rev 0)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/entity/ChatData.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -0,0 +1,68 @@
+package jp.sf.pal.chat.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ChatData implements Serializable {
+
+    private static final long serialVersionUID = -4571748778046264211L;
+
+    private Date date;
+
+    private String nameArg0;
+
+    private String nameArg1;
+
+    private String nameArg2;
+
+    private String msg;
+
+    public ChatData(String nameArg0, String nameArg1, String nameArg2,
+            String msg, Date date) {
+        this.nameArg0 = nameArg0;
+        this.nameArg1 = nameArg1;
+        this.nameArg2 = nameArg2;
+        this.msg = msg;
+        this.date = date;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getNameArg0() {
+        return nameArg0;
+    }
+
+    public void setNameArg0(String nameArg0) {
+        this.nameArg0 = nameArg0;
+    }
+
+    public String getNameArg1() {
+        return nameArg1;
+    }
+
+    public void setNameArg1(String nameArg1) {
+        this.nameArg1 = nameArg1;
+    }
+
+    public String getNameArg2() {
+        return nameArg2;
+    }
+
+    public void setNameArg2(String nameArg2) {
+        this.nameArg2 = nameArg2;
+    }
+}


Property changes on: chat/trunk/src/main/java/jp/sf/pal/chat/entity/ChatData.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: chat/trunk/src/main/java/jp/sf/pal/chat/form/ChatForm.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/form/ChatForm.java	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/form/ChatForm.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,6 +1,22 @@
 package jp.sf.pal.chat.form;
 
-public class ChatForm {
-	public String name;
-	public String msg;
+import java.io.Serializable;
+
+import org.seasar.struts.annotation.Maxbytelength;
+
+public class ChatForm implements Serializable {
+
+    private static final long serialVersionUID = 2574386315654611365L;
+
+    @Maxbytelength(maxbytelength = 100)
+    public String nameArg0;
+
+    @Maxbytelength(maxbytelength = 100)
+    public String nameArg1;
+
+    @Maxbytelength(maxbytelength = 100)
+    public String nameArg2;
+
+    @Maxbytelength(maxbytelength = 1000)
+    public String msg;
 }

Added: chat/trunk/src/main/java/jp/sf/pal/chat/util/ChatUtil.java
===================================================================
--- chat/trunk/src/main/java/jp/sf/pal/chat/util/ChatUtil.java	                        (rev 0)
+++ chat/trunk/src/main/java/jp/sf/pal/chat/util/ChatUtil.java	2008-11-28 08:10:16 UTC (rev 1470)
@@ -0,0 +1,119 @@
+package jp.sf.pal.chat.util;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Date;
+import java.util.LinkedList;
+
+import javax.servlet.ServletContext;
+
+import jp.sf.pal.chat.ChatConstants;
+import jp.sf.pal.chat.entity.ChatData;
+
+import org.seasar.framework.container.hotdeploy.HotdeployUtil;
+
+public class ChatUtil {
+
+    public static LinkedList<ChatData> getChatLogList(ServletContext context,
+            String scope) {
+        Object obj = context.getAttribute(ChatConstants.LOG_ATTRIBUTE_NAME
+                + scope);
+        if (obj != null && obj instanceof LinkedList) {
+            LinkedList<ChatData> chatLogList = (LinkedList<ChatData>) obj;
+            if (chatLogList.isEmpty()) {
+                return (LinkedList<ChatData>) obj;
+            }
+            chatLogList = (LinkedList<ChatData>) HotdeployUtil
+                    .rebuildValue(chatLogList);
+            ChatData chatData = chatLogList.getFirst();
+            if (chatData instanceof ChatData) {
+                // check class
+                return (LinkedList<ChatData>) obj;
+            }
+        }
+        LinkedList<ChatData> chatLogList;
+        try {
+            chatLogList = loadFile(context
+                    .getRealPath(ChatConstants.DEFAULT_FILE_DIR + scope));
+            context.setAttribute(ChatConstants.LOG_ATTRIBUTE_NAME + scope,
+                    chatLogList);
+        } catch (Exception e) {
+            chatLogList = new LinkedList<ChatData>();
+        }
+        return chatLogList;
+    }
+
+    public static void add(String scope, String nameArg0, String nameArg1,
+            String nameArg2, String msg, Date date, int maxSize,
+            ServletContext context) {
+        LinkedList<ChatData> chatLogList = getChatLogList(context, scope);
+        synchronized (chatLogList) {
+            chatLogList.addFirst(new ChatData(nameArg0, nameArg1, nameArg2,
+                    msg, date));
+            if (chatLogList.size() > maxSize) {
+                chatLogList.removeLast();
+            }
+            saveLog(scope, chatLogList, context);
+        }
+    }
+
+    private static void saveLog(String scope, LinkedList<ChatData> chatLogList,
+            ServletContext context) {
+        Long lastSaved = (Long) context.getAttribute(ChatConstants.LAST_SAVED);
+        if (lastSaved == null) {
+            lastSaved = Long.valueOf(0L);
+        }
+
+        long now = new Date().getTime();
+        if ((now - lastSaved.longValue()) > ChatConstants.SAVE_INTERVAL) {
+            try {
+                saveFile(context.getRealPath(ChatConstants.DEFAULT_FILE_DIR
+                        + scope), chatLogList);
+            } catch (Exception e) {
+            }
+            context.setAttribute(ChatConstants.LAST_SAVED, Long.valueOf(now));
+        }
+    }
+
+    private static void saveFile(String file, LinkedList<ChatData> chatLogList)
+            throws IOException {
+        ObjectOutputStream objectOutputStream = null;
+        try {
+            objectOutputStream = new ObjectOutputStream(new FileOutputStream(
+                    file));
+            objectOutputStream.writeObject(chatLogList);
+        } catch (IOException e) {
+            throw e;
+        } finally {
+            if (objectOutputStream != null) {
+                try {
+                    objectOutputStream.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+    }
+
+    private static LinkedList<ChatData> loadFile(String file)
+            throws IOException, ClassNotFoundException {
+        ObjectInputStream objectInputStream = null;
+        try {
+            objectInputStream = new ObjectInputStream(new FileInputStream(file));
+            return (LinkedList<ChatData>) objectInputStream.readObject();
+        } catch (IOException e) {
+            throw e;
+        } catch (ClassNotFoundException e) {
+            throw e;
+        } finally {
+            if (objectInputStream != null) {
+                try {
+                    objectInputStream.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+    }
+}


Property changes on: chat/trunk/src/main/java/jp/sf/pal/chat/util/ChatUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: chat/trunk/src/main/resources/application.properties
===================================================================
--- chat/trunk/src/main/resources/application.properties	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/resources/application.properties	2008-11-28 08:10:16 UTC (rev 1470)
@@ -25,3 +25,11 @@
 labels.message=Message
 labels.send=Send
 labels.load_now=Load Now
+
+# 0: Given name, 1: Family name, 2: Middle Name
+display.name={0} {2} {1}
+# 0: Given name, 1: Family name, 2: Middle Name, 3: Given name(Reading), 4: Family name(Reading)
+long.display.name={0} {2} {1}
+# 0: Given name(Reading), 1: Family name(Reading), 2: Middle Name
+phonetic.display.name={0} {2} {1}
+

Modified: chat/trunk/src/main/resources/application_ja.properties
===================================================================
--- chat/trunk/src/main/resources/application_ja.properties	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/resources/application_ja.properties	2008-11-28 08:10:16 UTC (rev 1470)
@@ -25,3 +25,11 @@
 labels.message=\u30e1\u30c3\u30bb\u30fc\u30b8
 labels.send=\u9001\u4fe1
 labels.load_now=\u8aad\u307f\u8fbc\u307f
+
+# 0: Given name, 1: Family name, 2: Middle Name
+display.name={1} {0}
+# 0: Given name, 1: Family name, 2: Middle Name, 3: Given name(Reading), 4: Family name(Reading)
+long.display.name={1} {0} ({4} {3})
+# 0: Given name(Reading), 1: Family name(Reading), 2: Middle Name
+phonetic.display.name={1} {0}
+

Modified: chat/trunk/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- chat/trunk/src/main/webapp/WEB-INF/portlet.xml	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/webapp/WEB-INF/portlet.xml	2008-11-28 08:10:16 UTC (rev 1470)
@@ -26,5 +26,21 @@
       <title>Chat</title>
     </portlet-info>
   </portlet>
+  <user-attribute>
+    <description>Given name</description>
+    <name>user.name.given</name>
+  </user-attribute>
+  <user-attribute>
+    <description>Family name</description>
+    <name>user.name.family</name>
+  </user-attribute>
+  <user-attribute>
+    <description>Middle name</description>
+    <name>user.name.middle</name>
+  </user-attribute>
+  <user-attribute>
+    <description>User Nickname</description>
+    <name>user.name.nickName</name>
+  </user-attribute>
 </portlet-app>
 

Modified: chat/trunk/src/main/webapp/WEB-INF/view/chat/index.jsp
===================================================================
--- chat/trunk/src/main/webapp/WEB-INF/view/chat/index.jsp	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/webapp/WEB-INF/view/chat/index.jsp	2008-11-28 08:10:16 UTC (rev 1470)
@@ -11,6 +11,29 @@
 <body>
 <portlet:defineObjects/>
 <script type="text/javascript">
+<!--
+if(typeof(jQuery) == "undefined"){
+	document.write('<script type="text/javascript" src="${f:url('/js/jquery-1.2.6.min.js')}"></script>');
+}
+// -->
+</script>
+<script type="text/javascript">
+<!--
+var cssFile="${f:url('/css/pal-extension.css')}";
+var isMSIE = /*@cc_on!@*/false;
+if(isMSIE) {
+    document.createStyleSheet(cssFile);
+} else {
+    var link = document.createElement("link");
+    link.setAttribute("rel", "stylesheet");
+    link.setAttribute("href", cssFile);
+    link.setAttribute("type", "text/css");
+    document.getElementsByTagName('head')[0].appendChild(link);
+}
+// -->
+</script>
+<script type="text/javascript">
+<!--
 function <portlet:namespace/>loadChat(){
 	var timekey = (new Date()).getTime();
 	$('#contents<portlet:namespace/>').load('${f:url('loadChat')}' + '?' + timekey);
@@ -19,7 +42,9 @@
 $(function(){
 	<portlet:namespace/>loadChat();
 });
+// -->
 </script>
+<div class="chat-portlet" style="padding:3px;">
 <s:form>
 <div class="form-table">
 <table border="0">
@@ -29,7 +54,7 @@
 			<td>
 	<input type="text" name="msg" value="" id="message<portlet:namespace/>">
 	<input type="button" value="<bean:message key="labels.send"/>"
-		onclick="$('#contents<portlet:namespace/>').load('${f:url('chat')}',{'name':'<%= request.getRemoteUser() %>','msg':$('#message<portlet:namespace/>')[0].value});
+		onclick="$('#contents<portlet:namespace/>').load('${f:url('chat')}',{'nameArg0':'${f:u(nameArg0)}','nameArg1':'${f:u(nameArg1)}','nameArg2':'${f:u(nameArg2)}','msg':$('#message<portlet:namespace/>')[0].value});
         $('#message<portlet:namespace/>')[0].value= ''; <portlet:namespace/>loadChat()" />
 	<input type="button" value="<bean:message key="labels.load_now"/>" onclick="<portlet:namespace/>loadChat()" />
 			</td>
@@ -39,5 +64,6 @@
 </div>	
 <div id="contents<portlet:namespace/>" style="margin:5px;"></div>
 </s:form>
+</div>
 </body>
 </html>
\ No newline at end of file

Deleted: chat/trunk/src/main/webapp/WEB-INF/view/index.jsp
===================================================================
--- chat/trunk/src/main/webapp/WEB-INF/view/index.jsp	2008-11-28 04:45:59 UTC (rev 1469)
+++ chat/trunk/src/main/webapp/WEB-INF/view/index.jsp	2008-11-28 08:10:16 UTC (rev 1470)
@@ -1,9 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Dolteng Auto Generated</title>
-</head>
-<body>
-<h1>Hello World!</h1>
-</body>
-</html>
\ No newline at end of file


pal-cvs メーリングリストの案内
Back to archive index