0
|
1 |
"{ Package: 'stx:goodies/ring' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Smalltalk }"
|
|
4 |
|
|
5 |
RGAbstractContainer subclass:#RGOrganization
|
|
6 |
instanceVariableNames:''
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Ring-Core-Containers'
|
|
10 |
!
|
|
11 |
|
|
12 |
RGOrganization comment:'An organization with categories'
|
|
13 |
!
|
|
14 |
|
|
15 |
!RGOrganization methodsFor:'accessing'!
|
|
16 |
|
|
17 |
categories
|
|
18 |
"Retrieves categories in the system (tag-packages)"
|
|
19 |
|
|
20 |
^self elements at: #categories ifAbsent:[ #() ]
|
|
21 |
!
|
|
22 |
|
|
23 |
categories: aCollection
|
|
24 |
"Set the categories collection"
|
|
25 |
|
|
26 |
self elements at: #categories put: aCollection
|
|
27 |
!
|
|
28 |
|
|
29 |
fullName
|
|
30 |
|
|
31 |
^#organization
|
|
32 |
! !
|
|
33 |
|
|
34 |
!RGOrganization methodsFor:'initialization'!
|
|
35 |
|
|
36 |
initialize
|
|
37 |
|
|
38 |
super initialize.
|
|
39 |
self categories: OrderedCollection new.
|
|
40 |
! !
|
|
41 |
|
|
42 |
!RGOrganization methodsFor:'testing'!
|
|
43 |
|
|
44 |
isOrganization
|
|
45 |
|
|
46 |
^true
|
|
47 |
!
|
|
48 |
|
|
49 |
isSameRevisionAs: aRGOrganization
|
|
50 |
"This method look for equality of the properties of the receiver"
|
|
51 |
|
|
52 |
^(self class = aRGOrganization class)
|
|
53 |
and:[ self categories = aRGOrganization categories ]
|
|
54 |
! !
|
|
55 |
|