Class: UCB::LDAP::Service

Inherits:
Entry
  • Object
show all
Defined in:
lib/ucb_ldap/service.rb

Overview

UCB::LDAP::Service

This class models a person’s service entries in the UCB LDAP directory.

services = Services.find_by_uid("1234")       #=> [#<UCB::LDAP::Service: ...>, ...]

Servicess are usually loaded through a Person instance:

p = Person.find_by_uid("1234")    #=> #<UCB::LDAP::Person: ...>
services = p.services        #=> [#<UCB::LDAP::Service: ...>, ...]

Note on Binds

You must have a privileged bind and pass your credentials to UCB::LDAP.authenticate() before performing your Service search.

Constant Summary

Constants inherited from Entry

Entry::TESTING

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entry

#assigned_attributes, #attributes, canonical, #canonical, combine_filters, create, create!, #dn, entity_name, filter_in, find_by_dn, #initialize, make_search_filter, #method_missing, net_ldap, #net_ldap, object_classes, required_attributes, required_schema_attributes, schema_attribute, schema_attributes_array, schema_attributes_hash, search, set_schema_attributes, tree_base, tree_base=, unique_object_class

Constructor Details

This class inherits a constructor from UCB::LDAP::Entry

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class UCB::LDAP::Entry

Class Method Details

.find_by_uid(uid) ⇒ Object

Returns an Array of JobAppointment for uid, sorted by record_number(). Returns an empty Array ([]) if nothing is found.



101
102
103
104
# File 'lib/ucb_ldap/service.rb', line 101

def self.find_by_uid(uid)
  warn "DEPRECATED: Services are longer supported by LDAP. This method always returns an empty Array"
  []
end

Instance Method Details

#common_nameObject



88
89
90
# File 'lib/ucb_ldap/service.rb', line 88

def common_name
  cn
end

#descriptionObject



92
93
94
# File 'lib/ucb_ldap/service.rb', line 92

def description
  super.first
end

#eligible_byObject



24
25
26
# File 'lib/ucb_ldap/service.rb', line 24

def eligible_by
  berkeleyEduPersonServiceEligibleBy
end

#eligible_dateObject



28
29
30
# File 'lib/ucb_ldap/service.rb', line 28

def eligible_date
  berkeleyEduPersonServiceEligibleDate
end

#end_dateObject



36
37
38
# File 'lib/ucb_ldap/service.rb', line 36

def end_date
  berkeleyEduPersonServiceEndDate
end

#ended_byObject



32
33
34
# File 'lib/ucb_ldap/service.rb', line 32

def ended_by
  berkeleyEduPersonServiceEndBy
end

#entered_byObject



40
41
42
# File 'lib/ucb_ldap/service.rb', line 40

def entered_by
  berkeleyEduPersonServiceEnteredBy
end

#entered_dateObject



44
45
46
# File 'lib/ucb_ldap/service.rb', line 44

def entered_date
  berkeleyEduPersonServiceEnteredDate
end

#levelObject



48
49
50
# File 'lib/ucb_ldap/service.rb', line 48

def level
  berkeleyEduPersonServiceLevel
end

#modified_byObject



52
53
54
# File 'lib/ucb_ldap/service.rb', line 52

def modified_by
  berkeleyEduPersonServiceModifiedBy
end

#modified_dateObject



56
57
58
# File 'lib/ucb_ldap/service.rb', line 56

def modified_date
  berkeleyEduPersonServiceModifiedDate
end

#naughty_bitObject



60
61
62
# File 'lib/ucb_ldap/service.rb', line 60

def naughty_bit
  berkeleyEduPersonServiceNaughtyBit
end

#notified_byObject



64
65
66
# File 'lib/ucb_ldap/service.rb', line 64

def notified_by
  berkeleyEduPersonServiceNotifyBy
end

#notify_dateObject



68
69
70
# File 'lib/ucb_ldap/service.rb', line 68

def notify_date
  berkeleyEduPersonServiceNotifyDate
end

#serviceObject



84
85
86
# File 'lib/ucb_ldap/service.rb', line 84

def service
  berkeleyEduService
end

#stop_dateObject



76
77
78
# File 'lib/ucb_ldap/service.rb', line 76

def stop_date
  berkeleyEduPersonServiceStopDate
end

#stopped_byObject



72
73
74
# File 'lib/ucb_ldap/service.rb', line 72

def stopped_by
  berkeleyEduPersonServiceStopBy
end

#valueObject



80
81
82
# File 'lib/ucb_ldap/service.rb', line 80

def value
  berkeleyEduPersonServiceValue
end