Class: JIRA::Project
- Inherits:
-
Object
- Object
- JIRA::Project
- Defined in:
- lib/jiraSOAP/remoteEntities.rb
Overview
Represents a project configuration. NOT straightforward. You need to explicitly ask for schemes in order to get them. By default, most project fetching methods purposely leave out all the scheme information as permission schemes can be very large.
Instance Attribute Summary collapse
- #description ⇒ String
- #id ⇒ String
- #issue_security_scheme ⇒ JIRA::Scheme
- #key ⇒ String
- #lead ⇒ String
- #name ⇒ String
- #notification_scheme ⇒ JIRA::Scheme
- #permission_scheme ⇒ JIRA::PermissionScheme
- #project_url ⇒ URL
- #url ⇒ URL
Class Method Summary collapse
-
.project_with_xml_fragment(frag) ⇒ JIRA::Project?
Factory method that takes a fragment of a SOAP response.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ String
343 344 345 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 343 def description @description end |
#id ⇒ String
331 332 333 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 331 def id @id end |
#issue_security_scheme ⇒ JIRA::Scheme
345 346 347 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 345 def issue_security_scheme @issue_security_scheme end |
#key ⇒ String
335 336 337 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 335 def key @key end |
#lead ⇒ String
341 342 343 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 341 def lead @lead end |
#name ⇒ String
333 334 335 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 333 def name @name end |
#notification_scheme ⇒ JIRA::Scheme
347 348 349 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 347 def notification_scheme @notification_scheme end |
#permission_scheme ⇒ JIRA::PermissionScheme
349 350 351 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 349 def @permission_scheme end |
#project_url ⇒ URL
339 340 341 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 339 def project_url @project_url end |
Class Method Details
.project_with_xml_fragment(frag) ⇒ JIRA::Project?
Factory method that takes a fragment of a SOAP response.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 354 def self.project_with_xml_fragment(frag) return if frag.nil? project = Project.new project.id = frag.xpath('id').to_s project.name = frag.xpath('name').to_s project.key = frag.xpath('key').to_s project.lead = frag.xpath('lead').to_s project.description = frag.xpath('description').to_s project.issue_security_scheme = Scheme.scheme_with_xml_fragment frag.xpath 'issueSecurityScheme' project.notification_scheme = Scheme.scheme_with_xml_fragment frag.xpath 'notificationScheme' project. = PermissionScheme.scheme_with_xml_fragment frag.xpath 'permissionScheme' url = frag.xpath('url').to_s project.url = URL.new url unless url.nil? url = frag.xpath('projectUrl').to_s project.project_url = URL.new url unless url.nil? project end |
Instance Method Details
#soapify_for(msg) ⇒ Handsoap::XmlMason::Node
TODO:
encode the schemes
378 379 380 381 382 383 384 385 386 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 378 def soapify_for(msg) msg.add 'id', @id msg.add 'name', @name msg.add 'key', @key msg.add 'url', @url msg.add 'projectUrl', @project_url msg.add 'lead', @lead msg.add 'description', @description end |