Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2009-11-25 03:47:26 +0000
committerrelves2009-11-25 03:47:26 +0000
commit173d40086f013b834908cb3a828bb78547af243c (patch)
tree727a8a29b5d7327cea551c9db6b271a9b5052db0 /org.eclipse.mylyn.oslc.core
parentf9d18153b6157adebba197243b96bd651e200c1b (diff)
downloadorg.eclipse.mylyn.tasks-173d40086f013b834908cb3a828bb78547af243c.tar.gz
org.eclipse.mylyn.tasks-173d40086f013b834908cb3a828bb78547af243c.tar.xz
org.eclipse.mylyn.tasks-173d40086f013b834908cb3a828bb78547af243c.zip
NEW - bug 281711: produce Java API for OSLC CM 1.0
https://bugs.eclipse.org/bugs/show_bug.cgi?id=281711
Diffstat (limited to 'org.eclipse.mylyn.oslc.core')
-rw-r--r--org.eclipse.mylyn.oslc.core/.classpath7
-rw-r--r--org.eclipse.mylyn.oslc.core/.cvsignore1
-rw-r--r--org.eclipse.mylyn.oslc.core/.project28
-rw-r--r--org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.core.prefs344
-rw-r--r--org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.oslc.core/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.oslc.core/META-INF/MANIFEST.MF17
-rw-r--r--org.eclipse.mylyn.oslc.core/build.properties16
-rw-r--r--org.eclipse.mylyn.oslc.core/plugin.xml6
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcConnector.java31
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcCoreConstants.java87
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcCreationDialogDescriptor.java57
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcSelectionDialogDescriptor.java112
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceDescriptor.java214
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceFactory.java92
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProvider.java38
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProviderCatalog.java25
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceContributor.java55
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceHome.java41
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/client/AbstractOslcClient.java570
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/AbstractChangeRequest.java103
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/Messages.java27
-rw-r--r--org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/messages.properties11
23 files changed, 1949 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.oslc.core/.classpath b/org.eclipse.mylyn.oslc.core/.classpath
new file mode 100644
index 000000000..64c5e31b7
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.mylyn.oslc.core/.cvsignore b/org.eclipse.mylyn.oslc.core/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/org.eclipse.mylyn.oslc.core/.project b/org.eclipse.mylyn.oslc.core/.project
new file mode 100644
index 000000000..16835c661
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.mylyn.oslc.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..2e0a4b010
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,344 @@
+#Wed Apr 08 12:46:06 PDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=disabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,SLOW
+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=80
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+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=false
+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=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+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=insert
+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=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+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=tab
+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
diff --git a/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 000000000..3cbb509c7
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,63 @@
+#Tue Oct 21 16:40:34 PDT 2008
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Mylyn based on Eclipse
+formatter_settings_version=11
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) 2004, 2008 Tasktop Technologies.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Tasktop EULA\r\n * which accompanies this distribution, and is available at\r\n * http\://tasktop.com/legal\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\r\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 000000000..8208aaac1
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Wed Apr 08 10:29:24 PDT 2009
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://tasktop.com/dev/bugs
diff --git a/org.eclipse.mylyn.oslc.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.oslc.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5cca1c317
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.mylyn.oslc.core;singleton:=true
+Bundle-Version: 3.2.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.mylyn.tasks.core;bundle-version="3.2.0",
+ org.eclipse.mylyn.commons.core;bundle-version="3.2.0",
+ org.eclipse.mylyn.commons.net;bundle-version="3.2.0",
+ com.sun.syndication;bundle-version="0.9.0",
+ org.jdom;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.mylyn.internal.oslc.core,
+ org.eclipse.mylyn.internal.oslc.core.client,
+ org.eclipse.mylyn.internal.oslc.core.cm
+Bundle-ClassPath: .
diff --git a/org.eclipse.mylyn.oslc.core/build.properties b/org.eclipse.mylyn.oslc.core/build.properties
new file mode 100644
index 000000000..02e0e43e7
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/build.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ lib/
diff --git a/org.eclipse.mylyn.oslc.core/plugin.xml b/org.eclipse.mylyn.oslc.core/plugin.xml
new file mode 100644
index 000000000..283d3ff7c
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/plugin.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+</plugin>
+
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcConnector.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcConnector.java
new file mode 100644
index 000000000..dbcae6a36
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcConnector.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+
+/**
+ * @author Robert Elves
+ */
+public interface IOslcConnector {
+
+ public List<OslcServiceProvider> getAvailableServices(TaskRepository repository, String url,
+ IProgressMonitor monitor) throws CoreException;
+
+ public OslcServiceDescriptor getServiceDescriptor(TaskRepository repository, OslcServiceProvider selectedPovider,
+ IProgressMonitor monitor) throws CoreException;
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcCoreConstants.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcCoreConstants.java
new file mode 100644
index 000000000..43e2213e9
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/IOslcCoreConstants.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import org.jdom.Namespace;
+
+/**
+ * @author Robert Elves
+ */
+public interface IOslcCoreConstants {
+
+ public static final String ID_PLUGIN = "org.eclipse.mylyn.oslc.core"; //$NON-NLS-1$
+
+ //Namespaces
+
+ public static final Namespace NAMESPACE_OSLC_CM_1_0 = Namespace.getNamespace("http://open-services.net/xmlns/cm/1.0/"); //$NON-NLS-1$
+
+ public static final Namespace NAMESPACE_OSLC_DISCOVERY_1_0 = Namespace.getNamespace("http://open-services.net/xmlns/discovery/1.0/"); //$NON-NLS-1$
+
+ public static final Namespace NAMESPACE_DC = Namespace.getNamespace("http://purl.org/dc/terms/"); //$NON-NLS-1$
+
+ public static final Namespace NAMESPACE_RDF = Namespace.getNamespace(
+ "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static final Namespace NAMESPACE_ATOM = Namespace.getNamespace("atom", "http://www.w3.org/2005/Atom"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // XML element ids
+ public static final String ELEMENT_SERVICE_PROVIDER_CATALOG = "ServiceProviderCatalog"; //$NON-NLS-1$
+
+ public static final String ELEMENT_SERVICE_PROVIDER = "ServiceProvider"; //$NON-NLS-1$
+
+ public static final String ELEMENT_CHANGEREQUEST = "ChangeRequest"; //$NON-NLS-1$
+
+ public static final String ELEMENT_SERVICES = "services"; //$NON-NLS-1$
+
+ public static final String ELEMENT_CREATIONDIALOG = "creationDialog"; //$NON-NLS-1$
+
+ public static final String ELEMENT_SELECTIONDIALOG = "selectionDialog"; //$NON-NLS-1$
+
+ public static final String ELEMENT_FACTORY = "factory"; //$NON-NLS-1$
+
+ public static final String ELEMENT_HOME = "home"; //$NON-NLS-1$
+
+ public static final String ELEMENT_TITLE = "title"; //$NON-NLS-1$
+
+ public static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$
+
+ public static final String ELEMENT_IDENTIFIER = "identifier"; //$NON-NLS-1$
+
+ public static final String ELEMENT_DESCRIPTION = "description"; //$NON-NLS-1$
+
+ public static final String ELEMENT_CREATOR = "creator"; //$NON-NLS-1$
+
+ public static final String ELEMENT_MODIFIED = "modified"; //$NON-NLS-1$
+
+ public static final String ELEMENT_SUBJECT = "subject"; //$NON-NLS-1$
+
+ public static final String ELEMENT_URL = "url"; //$NON-NLS-1$
+
+ public static final String ELEMENT_SIMPLEQUERY = "simpleQuery"; //$NON-NLS-1$
+
+ public static final String ELEMENT_LABEL = "label"; //$NON-NLS-1$
+
+ // XML attribute ids
+ public static final String ATTRIBUTE_RESOURCE = "resource"; //$NON-NLS-1$
+
+ public static final String ATTRIBUTE_DEFAULT = "default"; //$NON-NLS-1$
+
+ public static final String ATTRIBUTE_HINTWIDTH = "hintWidth"; //$NON-NLS-1$
+
+ public static final String ATTRIBUTE_HINTHEIGHT = "hintHeight"; //$NON-NLS-1$
+
+ // Http header keys
+ public static final String HEADER_ETAG = "ETag"; //$NON-NLS-1$
+
+ public static final String HEADER_IF_MATCH = "If-Match"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcCreationDialogDescriptor.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcCreationDialogDescriptor.java
new file mode 100644
index 000000000..fe9558ef8
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcCreationDialogDescriptor.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+
+/**
+ * @author Robert Elves
+ */
+public class OslcCreationDialogDescriptor implements Serializable {
+
+ private static final long serialVersionUID = 5159045583444273413L;
+
+ private String title;
+
+ private String relativeUrl;
+
+ private boolean isDefault;
+
+ public OslcCreationDialogDescriptor(String title, String relativeurl) {
+ this.title = title;
+ this.relativeUrl = relativeurl;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrl() {
+ return relativeUrl;
+ }
+
+ public void setUrl(String url) {
+ this.relativeUrl = url;
+ }
+
+ public boolean isDefault() {
+ return isDefault;
+ }
+
+ public void setDefault(boolean isDefault) {
+ this.isDefault = isDefault;
+ }
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcSelectionDialogDescriptor.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcSelectionDialogDescriptor.java
new file mode 100644
index 000000000..67e2134e6
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcSelectionDialogDescriptor.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+
+/**
+ * @see http://open-services.net/bin/view/Main/CmServiceDescriptionV1
+ *
+ * @author Robert Elves
+ */
+public class OslcSelectionDialogDescriptor implements Serializable {
+
+ private static final long serialVersionUID = -7728392262241197918L;
+
+ private boolean isDefault = false;
+
+ private String hintWidth;
+
+ private String hintHeight;
+
+ private final String title;
+
+ private final String url;
+
+ private String label;
+
+ public OslcSelectionDialogDescriptor(String title, String url) {
+ this.title = title;
+ this.url = url;
+ }
+
+ public void setDefault(boolean b) {
+ this.isDefault = b;
+ }
+
+ public boolean isDefault() {
+ return isDefault;
+ }
+
+ public String getHintWidth() {
+ return hintWidth;
+ }
+
+ public void setHintWidth(String hintWidth) {
+ this.hintWidth = hintWidth;
+ }
+
+ public String getHintHeight() {
+ return hintHeight;
+ }
+
+ public void setHintHeight(String hintHeight) {
+ this.hintHeight = hintHeight;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((url == null) ? 0 : url.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof OslcSelectionDialogDescriptor)) {
+ return false;
+ }
+ OslcSelectionDialogDescriptor other = (OslcSelectionDialogDescriptor) obj;
+ if (url == null) {
+ if (other.url != null) {
+ return false;
+ }
+ } else if (!url.equals(other.url)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceDescriptor.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceDescriptor.java
new file mode 100644
index 000000000..7d31ceee6
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceDescriptor.java
@@ -0,0 +1,214 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.mylyn.internal.oslc.core.cm.Messages;
+
+/**
+ * Could be considered equivalent to a repository configuration in Mylyn terminology. Model object for the OSLC Service
+ * Descriptor document.
+ *
+ * @see http://open-services.net/bin/view/Main/CmServiceDescriptionV1
+ *
+ * @author Robert Elves
+ */
+public class OslcServiceDescriptor implements Serializable {
+
+ private static final long serialVersionUID = -3895335172732891174L;
+
+ private final Set<OslcCreationDialogDescriptor> creationDialogs;
+
+ private final Set<OslcServiceFactory> serviceFactories;
+
+ private final Set<OslcSelectionDialogDescriptor> selectionDialogs;
+
+ private ServiceContributor contributor;
+
+ private ServiceHome home;
+
+ private String aboutUrl;
+
+ private String simpleQueryUrl;
+
+ private OslcServiceFactory defaultFactory;
+
+ private OslcCreationDialogDescriptor defaultDialog;
+
+ private String title;
+
+ private String description;
+
+ public OslcServiceDescriptor(String aboutUrl) {
+ this.aboutUrl = aboutUrl;
+ this.creationDialogs = new HashSet<OslcCreationDialogDescriptor>();
+ this.serviceFactories = new HashSet<OslcServiceFactory>();
+ this.selectionDialogs = new HashSet<OslcSelectionDialogDescriptor>();
+ }
+
+ public void clear() {
+ this.creationDialogs.clear();
+ this.serviceFactories.clear();
+ this.selectionDialogs.clear();
+ this.contributor = null;
+ this.title = null;
+ this.description = null;
+ this.defaultFactory = null;
+ this.simpleQueryUrl = null;
+ }
+
+ public Set<OslcCreationDialogDescriptor> getCreationDialogs() {
+ return Collections.unmodifiableSet(creationDialogs);
+ }
+
+ public void addCreationDialog(OslcCreationDialogDescriptor descriptor) {
+ creationDialogs.add(descriptor);
+ if (descriptor.isDefault()) {
+ defaultDialog = descriptor;
+ }
+ }
+
+ public String getAboutUrl() {
+ return aboutUrl;
+ }
+
+ public void setAboutUrl(String url) {
+ this.aboutUrl = url;
+ }
+
+ public void setDefaultCreationDialog(OslcCreationDialogDescriptor defaultDialog) {
+ this.defaultDialog = defaultDialog;
+ }
+
+ public OslcCreationDialogDescriptor getDefaultCreationDialog() {
+ return defaultDialog;
+ }
+
+ public void setDefaultFactory(OslcServiceFactory factory) {
+ this.defaultFactory = factory;
+ }
+
+ public OslcServiceFactory getDefaultFactory() {
+ if (defaultFactory == null && !serviceFactories.isEmpty()) {
+ return serviceFactories.iterator().next();
+ }
+ return defaultFactory;
+ }
+
+ public String getTitle() {
+ if (title != null) {
+ return title;
+ } else {
+ return Messages.OslcServiceDescriptor_Service_Available;
+ }
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ if (description != null) {
+ return description;
+ } else {
+ return Messages.OslcServiceDescriptor_Service_Available;
+ }
+ }
+
+ public String getSimpleQueryUrl() {
+ return simpleQueryUrl;
+ }
+
+ public void setSimpleQueryUrl(String simpleQueryUrl) {
+ this.simpleQueryUrl = simpleQueryUrl;
+ }
+
+ public Set<OslcSelectionDialogDescriptor> getSelectionDialogs() {
+ return Collections.unmodifiableSet(selectionDialogs);
+ }
+
+ public void addSelectionDialog(OslcSelectionDialogDescriptor dialog) {
+ selectionDialogs.add(dialog);
+ }
+
+ public OslcSelectionDialogDescriptor getDefaultSelectionDialog() {
+ for (OslcSelectionDialogDescriptor dialog : selectionDialogs) {
+ if (dialog.isDefault()) {
+ return dialog;
+ }
+ }
+ return null;
+ }
+
+ public Set<OslcServiceFactory> getFactories() {
+ return Collections.unmodifiableSet(serviceFactories);
+ }
+
+ public void addServiceFactory(OslcServiceFactory factory) {
+ serviceFactories.add(factory);
+ }
+
+ public void setContributor(ServiceContributor contributor) {
+ this.contributor = contributor;
+ }
+
+ public ServiceContributor getContributor() {
+ return this.contributor;
+ }
+
+ public void setHome(ServiceHome home) {
+ this.home = home;
+ }
+
+ public ServiceHome getHome() {
+ return home;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((aboutUrl == null) ? 0 : aboutUrl.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof OslcServiceDescriptor)) {
+ return false;
+ }
+ OslcServiceDescriptor other = (OslcServiceDescriptor) obj;
+ if (aboutUrl == null) {
+ if (other.aboutUrl != null) {
+ return false;
+ }
+ } else if (!aboutUrl.equals(other.aboutUrl)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceFactory.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceFactory.java
new file mode 100644
index 000000000..7534c6a42
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceFactory.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+
+/**
+ * @see http://open-services.net/bin/view/Main/CmServiceDescriptionV1
+ *
+ * @author Robert Elves
+ */
+public class OslcServiceFactory implements Serializable {
+
+ private static final long serialVersionUID = -8495019838789015468L;
+
+ private final String url;
+
+ private final String title;
+
+ private String label;
+
+ private boolean isDefault;
+
+ public OslcServiceFactory(String title, String url) {
+ this.title = title;
+ this.url = url;
+ }
+
+ public void setDefault(boolean isDefault) {
+ this.isDefault = isDefault;
+ }
+
+ public boolean isDefault() {
+ return this.isDefault;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String l) {
+ this.label = l;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((url == null) ? 0 : url.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof OslcServiceFactory)) {
+ return false;
+ }
+ OslcServiceFactory other = (OslcServiceFactory) obj;
+ if (url == null) {
+ if (other.url != null) {
+ return false;
+ }
+ } else if (!url.equals(other.url)) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProvider.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProvider.java
new file mode 100644
index 000000000..cebe10146
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProvider.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+/**
+ * @see http://open-services.net/bin/view/Main/OslcServiceProviderCatalogV1
+ *
+ * @author Robert Elves
+ */
+public class OslcServiceProvider {
+
+ private final String name;
+
+ private final String url;
+
+ public OslcServiceProvider(String name, String url) {
+ this.name = name;
+ this.url = url;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProviderCatalog.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProviderCatalog.java
new file mode 100644
index 000000000..b3b75abf3
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/OslcServiceProviderCatalog.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+/**
+ * @see http://open-services.net/bin/view/Main/OslcServiceProviderCatalogV1
+ *
+ * @author Robert Elves
+ */
+public class OslcServiceProviderCatalog extends OslcServiceProvider {
+
+ public OslcServiceProviderCatalog(String name, String url) {
+ super(name, url);
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceContributor.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceContributor.java
new file mode 100644
index 000000000..b3a496141
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceContributor.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+
+/**
+ * @see http://open-services.net/bin/view/Main/CmServiceDescriptionV1
+ *
+ * @author Robert Elves
+ */
+public class ServiceContributor implements Serializable {
+
+ private static final long serialVersionUID = -3975425402750114209L;
+
+ private String title;
+
+ private final String identifier;
+
+ private String icon;
+
+ public ServiceContributor(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getIcon() {
+ return icon;
+ }
+
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceHome.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceHome.java
new file mode 100644
index 000000000..22df72b6b
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/ServiceHome.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core;
+
+import java.io.Serializable;
+
+/**
+ * @see http://open-services.net/bin/view/Main/CmServiceDescriptionV1
+ *
+ * @author Robert Elves
+ */
+public class ServiceHome implements Serializable {
+
+ private static final long serialVersionUID = -723213938552650293L;
+
+ private final String title;
+
+ private final String url;
+
+ public ServiceHome(String title, String url) {
+ this.title = title;
+ this.url = url;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/client/AbstractOslcClient.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/client/AbstractOslcClient.java
new file mode 100644
index 000000000..a27f7e7e6
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/client/AbstractOslcClient.java
@@ -0,0 +1,570 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core.client;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.httpclient.URIException;
+import org.apache.commons.httpclient.cookie.CookiePolicy;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.RequestEntity;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.mylyn.commons.core.StatusHandler;
+import org.eclipse.mylyn.commons.net.AbstractWebLocation;
+import org.eclipse.mylyn.commons.net.Policy;
+import org.eclipse.mylyn.commons.net.WebUtil;
+import org.eclipse.mylyn.internal.oslc.core.IOslcCoreConstants;
+import org.eclipse.mylyn.internal.oslc.core.OslcCreationDialogDescriptor;
+import org.eclipse.mylyn.internal.oslc.core.OslcSelectionDialogDescriptor;
+import org.eclipse.mylyn.internal.oslc.core.OslcServiceDescriptor;
+import org.eclipse.mylyn.internal.oslc.core.OslcServiceFactory;
+import org.eclipse.mylyn.internal.oslc.core.OslcServiceProvider;
+import org.eclipse.mylyn.internal.oslc.core.OslcServiceProviderCatalog;
+import org.eclipse.mylyn.internal.oslc.core.ServiceHome;
+import org.eclipse.mylyn.internal.oslc.core.cm.AbstractChangeRequest;
+import org.eclipse.mylyn.tasks.core.RepositoryResponse;
+import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
+import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
+import org.eclipse.mylyn.tasks.core.data.TaskData;
+import org.jdom.Attribute;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.filter.ElementFilter;
+import org.jdom.input.SAXBuilder;
+
+/**
+ * Base class from which to implement an OSLC client
+ *
+ * @author Robert Elves
+ */
+public abstract class AbstractOslcClient {
+
+ protected final AbstractWebLocation location;
+
+ protected final HttpClient httpClient;
+
+ protected final OslcServiceDescriptor configuration;
+
+ public AbstractOslcClient(AbstractWebLocation location, OslcServiceDescriptor data) {
+ this.location = location;
+ this.httpClient = createHttpClient();
+ this.configuration = data;
+ }
+
+ protected HttpClient createHttpClient() {
+ HttpClient httpClient = new HttpClient();
+ httpClient.setHttpConnectionManager(WebUtil.getConnectionManager());
+ httpClient.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
+
+ // See: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=85127\
+ // Added to support fix session cookie issue when talking to tomcat
+ httpClient.getParams().setParameter("http.protocol.single-cookie-header", true); //$NON-NLS-1$
+
+ WebUtil.configureHttpClient(httpClient, getUserAgent());
+ return httpClient;
+ }
+
+ /**
+ * Return your unique connector identifier i.e. com.mycompany.myconnector
+ */
+ public abstract String getUserAgent();
+
+ /**
+ * Exposed at connector level via IOslcCoreConnector.getAvailableServices()
+ */
+ public List<OslcServiceProvider> getAvailableServices(String url, IProgressMonitor monitor) throws CoreException {
+ final List<OslcServiceProvider> result = new ArrayList<OslcServiceProvider>();
+
+ GetRequest request = new GetRequest(url) {
+
+ @Override
+ public void run(GetMethod method, IProgressMonitor monitor) throws CoreException {
+ try {
+ parseServices(method.getResponseBodyAsStream(), result, monitor);
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Network error occurred retrieving available services: " + e.getMessage(), e)); //$NON-NLS-1$
+ }
+ }
+ };
+
+ request.execute(monitor);
+
+ return result;
+ }
+
+ protected Document getDocumentFromMethod(HttpMethodBase method) throws CoreException {
+ try {
+ return getDocumentFromStream(method.getResponseBodyAsStream());
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Network error obtaining response from server: " + e.getMessage(), e)); //$NON-NLS-1$
+ }
+ }
+
+ protected Document getDocumentFromStream(InputStream inStream) throws CoreException {
+ SAXBuilder builder = new SAXBuilder();
+ builder.setExpandEntities(false);
+ try {
+ return builder.build(inStream);
+ } catch (JDOMException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Error parsing response: " + e.getMessage(), e)); //$NON-NLS-1$
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Network error parsing response: " + e.getMessage(), e)); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * public for testing
+ */
+ public void parseServices(InputStream inStream, Collection<OslcServiceProvider> providers, IProgressMonitor monitor)
+ throws CoreException {
+
+ Document doc = getDocumentFromStream(inStream);
+
+ Iterator<?> itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_SERVICE_PROVIDER_CATALOG));
+ while (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ if (element.getParent() != doc.getRootElement()) {
+ Attribute attrResource = element.getAttribute(IOslcCoreConstants.ATTRIBUTE_RESOURCE,
+ IOslcCoreConstants.NAMESPACE_RDF);
+ String title = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC)
+ .getText();
+ if (attrResource != null && attrResource.getValue().length() > 0) {
+ providers.add(new OslcServiceProviderCatalog(title, attrResource.getValue()));
+ }
+ }
+ }
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_SERVICE_PROVIDER));
+ while (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ String title = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC)
+ .getText();
+ Element service = element.getChild(IOslcCoreConstants.ELEMENT_SERVICES,
+ IOslcCoreConstants.NAMESPACE_OSLC_DISCOVERY_1_0);
+ if (service != null) {
+ String resource = service.getAttributeValue(IOslcCoreConstants.ATTRIBUTE_RESOURCE,
+ IOslcCoreConstants.NAMESPACE_RDF);
+ providers.add(new OslcServiceProvider(title, resource));
+ }
+ }
+ }
+
+ /**
+ * Retrieve a service descriptor for the given service provider. Exposed at connector level by
+ * IOslcConnector.getServiceDescriptor()
+ *
+ * @throws CoreException
+ */
+ public OslcServiceDescriptor getServiceDescriptor(OslcServiceProvider provider, IProgressMonitor monitor)
+ throws CoreException {
+ OslcServiceDescriptor configuration = new OslcServiceDescriptor(provider.getUrl());
+ downloadServiceDescriptor(configuration, monitor);
+ return configuration;
+ }
+
+ /**
+ * Populate the provided configuration with new data from the remote repository.
+ */
+ protected void downloadServiceDescriptor(final OslcServiceDescriptor config, IProgressMonitor monitor)
+ throws CoreException {
+ config.clear();
+
+ GetRequest request = new GetRequest(config.getAboutUrl()) {
+
+ @Override
+ public void run(GetMethod method, IProgressMonitor monitor) throws CoreException {
+ try {
+ parseServiceDescriptor(method.getResponseBodyAsStream(), config, monitor);
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Network error occurred while downloading service descriptor: " + e.getMessage(), e)); //$NON-NLS-1$
+ }
+ }
+ };
+
+ request.execute(monitor);
+ }
+
+ /**
+ * public for testing
+ */
+ public void parseServiceDescriptor(InputStream inStream, OslcServiceDescriptor config, IProgressMonitor monitor)
+ throws CoreException {
+ Document doc = getDocumentFromStream(inStream);
+
+ Iterator<?> itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_TITLE,
+ IOslcCoreConstants.NAMESPACE_DC));
+ if (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ config.setTitle(element.getText());
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_DESCRIPTION,
+ IOslcCoreConstants.NAMESPACE_DC));
+ if (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ config.setDescription(element.getText());
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_CREATIONDIALOG));
+ while (itr.hasNext()) {
+ boolean isDefault = false;
+ Element element = (Element) itr.next();
+ String label = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC)
+ .getText();
+ String url = element.getChild(IOslcCoreConstants.ELEMENT_URL, IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0)
+ .getText();
+ Attribute attrDefault = element.getAttribute(IOslcCoreConstants.ATTRIBUTE_DEFAULT,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (attrDefault != null && attrDefault.getValue().equals("true")) { //$NON-NLS-1$
+ isDefault = true;
+ }
+ OslcCreationDialogDescriptor recordType = new OslcCreationDialogDescriptor(label, url);
+ config.addCreationDialog(recordType);
+ if (isDefault) {
+ config.setDefaultCreationDialog(recordType);
+ }
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_SIMPLEQUERY));
+ if (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ String url = element.getChild(IOslcCoreConstants.ELEMENT_URL, IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0)
+ .getText();
+ if (url != null) {
+ config.setSimpleQueryUrl(url);
+ }
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_FACTORY));
+ while (itr.hasNext()) {
+ boolean isDefault = false;
+ Element element = (Element) itr.next();
+ String title = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC)
+ .getText();
+ String url = element.getChild(IOslcCoreConstants.ELEMENT_URL, IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0)
+ .getText();
+ if (element.getAttribute(IOslcCoreConstants.ATTRIBUTE_DEFAULT) != null
+ && element.getAttribute(IOslcCoreConstants.ATTRIBUTE_DEFAULT).getValue().equals("true")) { //$NON-NLS-1$
+ isDefault = true;
+ }
+ OslcServiceFactory factory = new OslcServiceFactory(title, url);
+ if (isDefault) {
+ config.setDefaultFactory(factory);
+ }
+ config.addServiceFactory(factory);
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_HOME));
+ if (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ Element childTitle = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC);
+ Element childUrl = element.getChild(IOslcCoreConstants.ELEMENT_URL,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (childTitle != null && childTitle.getText().length() > 0 && childUrl != null
+ && childUrl.getText().length() > 0) {
+ ServiceHome home = new ServiceHome(childTitle.getText(), childUrl.getText());
+ config.setHome(home);
+ }
+ }
+
+ itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_SELECTIONDIALOG));
+ if (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ Element childTitle = element.getChild(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC);
+ Element childUrl = element.getChild(IOslcCoreConstants.ELEMENT_URL,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (childTitle != null && childTitle.getText().length() > 0 && childUrl != null
+ && childUrl.getText().length() > 0) {
+
+ OslcSelectionDialogDescriptor selection = new OslcSelectionDialogDescriptor(childTitle.getText(),
+ childUrl.getText());
+
+ String isDefault = element.getAttributeValue(IOslcCoreConstants.ATTRIBUTE_DEFAULT,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (isDefault != null) {
+ selection.setDefault(isDefault.equals("true")); //$NON-NLS-1$
+ }
+
+ String hintHeight = element.getAttributeValue(IOslcCoreConstants.ATTRIBUTE_HINTHEIGHT,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (hintHeight != null) {
+ selection.setHintHeight(hintHeight);
+ }
+
+ String hintWidth = element.getAttributeValue(IOslcCoreConstants.ATTRIBUTE_HINTWIDTH,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (hintWidth != null) {
+ selection.setHintWidth(hintWidth);
+ }
+
+ String label = element.getChildText(IOslcCoreConstants.ELEMENT_LABEL,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0);
+ if (label != null) {
+ selection.setLabel(label);
+ }
+
+ config.addSelectionDialog(selection);
+ }
+ }
+
+ }
+
+ public Collection<AbstractChangeRequest> performQuery(String queryUrl, IProgressMonitor monitor)
+ throws CoreException {
+ final Collection<AbstractChangeRequest> result = new ArrayList<AbstractChangeRequest>();
+
+ GetRequest request = new GetRequest(queryUrl) {
+
+ @Override
+ public void run(GetMethod method, IProgressMonitor monitor) throws CoreException {
+ try {
+ parseQueryResponse(method.getResponseBodyAsStream(), result, monitor);
+ // TODO: Handle pagination
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Network error occurred retrieving available services: " + e.getMessage(), e)); //$NON-NLS-1$
+ }
+ }
+ };
+
+ request.execute(monitor);
+
+ return result;
+ }
+
+ // TODO: Handle pagination
+ public void parseQueryResponse(InputStream inStream, Collection<AbstractChangeRequest> requests,
+ IProgressMonitor monitor) throws CoreException {
+ Document doc = getDocumentFromStream(inStream);
+
+ Iterator<?> itr = doc.getDescendants(new ElementFilter(IOslcCoreConstants.ELEMENT_CHANGEREQUEST,
+ IOslcCoreConstants.NAMESPACE_OSLC_CM_1_0));
+ while (itr.hasNext()) {
+ Element element = (Element) itr.next();
+ String title = element.getChildText(IOslcCoreConstants.ELEMENT_TITLE, IOslcCoreConstants.NAMESPACE_DC);
+ String id = element.getChildText(IOslcCoreConstants.ELEMENT_IDENTIFIER, IOslcCoreConstants.NAMESPACE_DC);
+
+ if (title != null && id != null) {
+ AbstractChangeRequest request = createChangeRequest(id, title);
+ request.setType(element.getChildText(IOslcCoreConstants.ELEMENT_TYPE, IOslcCoreConstants.NAMESPACE_DC));
+ request.setDescription(element.getChildText(IOslcCoreConstants.ELEMENT_DESCRIPTION,
+ IOslcCoreConstants.NAMESPACE_DC));
+ request.setSubject(element.getChildText(IOslcCoreConstants.ELEMENT_SUBJECT,
+ IOslcCoreConstants.NAMESPACE_DC));
+ request.setCreator(element.getChildText(IOslcCoreConstants.ELEMENT_CREATOR,
+ IOslcCoreConstants.NAMESPACE_DC));
+ request.setModified(element.getChildText(IOslcCoreConstants.ELEMENT_MODIFIED,
+ IOslcCoreConstants.NAMESPACE_DC));
+ requests.add(request);
+ }
+
+ }
+
+ }
+
+ protected abstract AbstractChangeRequest createChangeRequest(String id, String title);
+
+ /**
+ * Updates this clients 'repository configuration'. If old types were in use (locally cached) and still exist they
+ * are re-read from repository.
+ */
+ public void updateRepositoryConfiguration(IProgressMonitor monitor) throws CoreException {
+ configuration.clear();
+ downloadServiceDescriptor(configuration, monitor);
+ }
+
+ public abstract TaskData getTaskData(final String encodedTaskId, TaskAttributeMapper mapper,
+ IProgressMonitor monitor) throws CoreException;
+
+ public abstract RepositoryResponse putTaskData(TaskData taskData, Set<TaskAttribute> oldValues,
+ IProgressMonitor monitor) throws CoreException;
+
+ protected abstract class GetRequest extends HttpRequest<GetMethod> {
+
+ public GetRequest(String resourceUrl) {
+ super(resourceUrl);
+ }
+
+ @Override
+ public GetMethod constructMethod(String requestPath) {
+ return new GetMethod(requestPath);
+ }
+ }
+
+ protected abstract class PutRequest extends HttpRequest<PutMethod> {
+
+ private final RequestEntity entity;
+
+ private final Map<String, String> requestHeaders = new HashMap<String, String>();
+
+ public PutRequest(String resourceUrl, RequestEntity entity) {
+ super(resourceUrl);
+ this.entity = entity;
+ }
+
+ public void setRequestHeader(String key, String value) {
+ requestHeaders.put(key, value);
+ }
+
+ @Override
+ public PutMethod constructMethod(String requestPath) {
+ PutMethod method = new PutMethod(requestPath);
+ method.setRequestEntity(entity);
+ for (String key : requestHeaders.keySet()) {
+ method.addRequestHeader(key, requestHeaders.get(key));
+ }
+ return method;
+ }
+ }
+
+ protected abstract class PostRequest extends HttpRequest<PostMethod> {
+
+ private final NameValuePair[] pairs;
+
+ private RequestEntity entity;
+
+ public PostRequest(String resourceUrl, NameValuePair[] pairs) {
+ super(resourceUrl);
+ this.pairs = pairs;
+ }
+
+ @Override
+ public PostMethod constructMethod(String requestPath) {
+ PostMethod method = new PostMethod(requestPath);
+ this.entity = getRequestEntity(method);
+ if (pairs != null) {
+ method.setRequestBody(pairs);
+ } else if (entity != null) {
+ method.setRequestEntity(entity);
+ } else {
+ StatusHandler.log(new Status(IStatus.WARNING, IOslcCoreConstants.ID_PLUGIN,
+ "Request body or entity missing upon post.")); //$NON-NLS-1$
+ }
+ return method;
+ }
+
+ public RequestEntity getRequestEntity(PostMethod method) {
+ return null;
+ }
+ }
+
+ protected void handleReturnCode(int code, HttpMethodBase method) throws CoreException {
+ try {
+ if (code == java.net.HttpURLConnection.HTTP_OK) {
+ return;// Status.OK_STATUS;
+ } else if (code == java.net.HttpURLConnection.HTTP_MOVED_TEMP
+ || code == java.net.HttpURLConnection.HTTP_CREATED) {
+ // A new resource created...
+ return;// Status.OK_STATUS;
+ } else if (code == java.net.HttpURLConnection.HTTP_UNAUTHORIZED
+ || code == java.net.HttpURLConnection.HTTP_FORBIDDEN) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Unable to log into server, ensure repository credentials are correct.")); //$NON-NLS-1$
+ } else if (code == java.net.HttpURLConnection.HTTP_PRECON_FAILED) {
+ // Mid-air collision
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Mid-air collision occurred.")); //$NON-NLS-1$
+ } else if (code == java.net.HttpURLConnection.HTTP_CONFLICT) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN, "A conflict occurred.")); //$NON-NLS-1$
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN,
+ "Unknown error occurred. Http Code: " + code + " Request: " + method.getURI() + " Response: " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + method.getResponseBodyAsString()));
+ }
+ } catch (URIException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN, "Network Error: " //$NON-NLS-1$
+ + e.getMessage()));
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, IOslcCoreConstants.ID_PLUGIN, "Network Error: " //$NON-NLS-1$
+ + e.getMessage()));
+ }
+ }
+
+ protected abstract class HttpRequest<T extends HttpMethodBase> {
+
+ private T method;
+
+ private HostConfiguration hostConfiguration;
+
+ private final String url;
+
+ public HttpRequest(String url) {
+ this.url = url;
+ }
+
+ public void execute(IProgressMonitor monitor) throws CoreException {
+ monitor = Policy.monitorFor(monitor);
+ try {
+ monitor.beginTask(getTaskName(), IProgressMonitor.UNKNOWN);
+ method = constructMethod(getRequestPath(url));
+ method.setFollowRedirects(false);
+ method.setDoAuthentication(true);
+ // application/xml is returned by oslc servers by default
+ //method.setRequestHeader("Accept", "application/xml");
+ hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
+ int code = WebUtil.execute(httpClient, hostConfiguration, method, monitor);
+
+ handleReturnCode(code, method);
+ run(method, monitor);
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.WARNING, IOslcCoreConstants.ID_PLUGIN,
+ "An unexpected network error has occurred: " + e.getMessage(), e)); //$NON-NLS-1$
+ } finally {
+ if (method != null) {
+ method.releaseConnection();
+ }
+ monitor.done();
+ }
+
+ }
+
+ protected String getTaskName() {
+ return "Retrieving from server..."; //$NON-NLS-1$
+ }
+
+ public abstract void run(T method, IProgressMonitor monitor) throws CoreException, IOException;
+
+ public abstract T constructMethod(String requestPath);
+
+ }
+
+ public String getRequestPath(String repositoryUrl) {
+ if (repositoryUrl.startsWith("./")) { //$NON-NLS-1$
+ return WebUtil.getRequestPath(location.getUrl()) + repositoryUrl.substring(1);
+ } else if (repositoryUrl.startsWith("/")) { //$NON-NLS-1$
+ return WebUtil.getRequestPath(location.getUrl()) + repositoryUrl;
+ }
+ return WebUtil.getRequestPath(repositoryUrl);
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/AbstractChangeRequest.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/AbstractChangeRequest.java
new file mode 100644
index 000000000..2ccd6d061
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/AbstractChangeRequest.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2008 Tasktop Technologies.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Tasktop EULA
+ * which accompanies this distribution, and is available at
+ * http://tasktop.com/legal
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core.cm;
+
+/**
+ * @see http://open-services.net/bin/view/Main/CmResourceDefinitionsV1
+ *
+ * @author Robert Elves
+ */
+public abstract class AbstractChangeRequest {
+
+ protected final String identifier;
+
+ protected String title;
+
+ private String type;
+
+ private String description;
+
+ private String subject;
+
+ private String creator;
+
+ private String modified;
+
+ private String url;
+
+ public AbstractChangeRequest(String identifier, String title) {
+ this.identifier = identifier;
+ this.title = title;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getSubject() {
+ return subject;
+ }
+
+ public void setSubject(String subject) {
+ this.subject = subject;
+ }
+
+ public String getCreator() {
+ return creator;
+ }
+
+ public void setCreator(String creator) {
+ this.creator = creator;
+ }
+
+ public String getModified() {
+ return modified;
+ }
+
+ /**
+ * @param modified
+ * - must conform to RFC3339
+ */
+ public void setModified(String modified) {
+ this.modified = modified;
+ }
+
+} \ No newline at end of file
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/Messages.java b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/Messages.java
new file mode 100644
index 000000000..ebc1678eb
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.oslc.core.cm;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.oslc.cm.internal.core.model.messages"; //$NON-NLS-1$
+
+ public static String OslcServiceDescriptor_Service_Available;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/messages.properties b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/messages.properties
new file mode 100644
index 000000000..c78abf4ed
--- /dev/null
+++ b/org.eclipse.mylyn.oslc.core/src/org/eclipse/mylyn/internal/oslc/core/cm/messages.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+OslcServiceDescriptor_Service_Available=Service Available

Back to the top