Class: JIRA::Project

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionString

Returns:

  • (String)


343
344
345
# File 'lib/jiraSOAP/remoteEntities.rb', line 343

def description
  @description
end

#idString

Returns:

  • (String)


331
332
333
# File 'lib/jiraSOAP/remoteEntities.rb', line 331

def id
  @id
end

#issue_security_schemeJIRA::Scheme

Returns:



345
346
347
# File 'lib/jiraSOAP/remoteEntities.rb', line 345

def issue_security_scheme
  @issue_security_scheme
end

#keyString

Returns:

  • (String)


335
336
337
# File 'lib/jiraSOAP/remoteEntities.rb', line 335

def key
  @key
end

#leadString

Returns:

  • (String)


341
342
343
# File 'lib/jiraSOAP/remoteEntities.rb', line 341

def lead
  @lead
end

#nameString

Returns:

  • (String)


333
334
335
# File 'lib/jiraSOAP/remoteEntities.rb', line 333

def name
  @name
end

#notification_schemeJIRA::Scheme

Returns:



347
348
349
# File 'lib/jiraSOAP/remoteEntities.rb', line 347

def notification_scheme
  @notification_scheme
end

#permission_schemeJIRA::PermissionScheme



349
350
351
# File 'lib/jiraSOAP/remoteEntities.rb', line 349

def permission_scheme
  @permission_scheme
end

#project_urlURL

Returns:



339
340
341
# File 'lib/jiraSOAP/remoteEntities.rb', line 339

def project_url
  @project_url
end

#urlURL

Returns:



337
338
339
# File 'lib/jiraSOAP/remoteEntities.rb', line 337

def url
  @url
end

Class Method Details

.project_with_xml_fragment(frag) ⇒ JIRA::Project?

Factory method that takes a fragment of a SOAP response.

Parameters:

  • frag (Handsoap::XmlQueryFront::NokogiriDriver)

Returns:



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.permission_scheme     =
    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

Parameters:

Returns:



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