Index: pykota/trunk/initscripts/ldap/pykota.schema
===================================================================
--- pykota/trunk/initscripts/ldap/pykota.schema (revision 1015)
+++ pykota/trunk/initscripts/ldap/pykota.schema (revision 1017)
@@ -16,4 +16,6 @@
 #
 #
+# Contributors : Leif Johansson
+#
 # THIS IS WORK UNDER HEAVY DEVELOPPMENT !
 #
@@ -24,6 +26,9 @@
 #
 
-## Pykota related LDAP attributes
+#        
+# PyKota Attributes Types
+#
 
+# pykotaLimitBy
 attributetype ( 1.3.6.1.4.1.16868.1.1.1 NAME 'pykotaLimitBy'
         DESC 'How to limit the user/group : quota or balance'
@@ -31,4 +36,5 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
+# pykotaBalance
 attributetype ( 1.3.6.1.4.1.16868.1.1.2 NAME 'pykotaBalance'
         DESC 'Current account balance for the user, float'
@@ -36,4 +42,5 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
+# pykotaLifeTimePaid
 attributetype ( 1.3.6.1.4.1.16868.1.1.3 NAME 'pykotaLifeTimePaid'
         DESC 'Total money paid by the user to fill his account balance, float'
@@ -41,4 +48,5 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
+# pykotaPricePerPage
 attributetype ( 1.3.6.1.4.1.16868.1.1.4 NAME 'pykotaPricePerPage'
         DESC 'Price per page for a printer, float'
@@ -46,4 +54,5 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
+# pykotaPricePerJob
 attributetype ( 1.3.6.1.4.1.16868.1.1.5 NAME 'pykotaPricePerJob'
         DESC 'Price per job for a printer, float'
@@ -51,99 +60,137 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.6 NAME 'pykotaPrinterName'
-        DESC 'Printer name as defined in the printing environment, e.g. lp'
-        EQUALITY caseIgnoreIA5Match
-        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.16868.1.1.7 NAME 'pykotaSoftLimit'
+# pykotaSoftLimit
+attributetype ( 1.3.6.1.4.1.16868.1.1.6 NAME 'pykotaSoftLimit'
         DESC 'Soft limit in maximal number of pages'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
         
-attributetype ( 1.3.6.1.4.1.16868.1.1.8 NAME 'pykotaHardLimit'
+# pykotaHardLimit        
+attributetype ( 1.3.6.1.4.1.16868.1.1.7 NAME 'pykotaHardLimit'
         DESC 'Hard limit in maximal number of pages'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.9 NAME 'pykotaDateLimit'
+# pykotaDateLimit
+attributetype ( 1.3.6.1.4.1.16868.1.1.8 NAME 'pykotaDateLimit'
         DESC 'Date at which the soft limit becomes a hard one'
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.10 NAME 'pykotaPageCounter'
+# pykotaPageCounter
+attributetype ( 1.3.6.1.4.1.16868.1.1.9 NAME 'pykotaPageCounter'
         DESC 'Current page counter for the user on a particular printer'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.11 NAME 'pykotaLifePageCounter'
+# pykotaLifePageCounter
+attributetype ( 1.3.6.1.4.1.16868.1.1.10 NAME 'pykotaLifePageCounter'
         DESC 'Total page counter for the user on a particular printer'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.12 NAME 'pykotaJobHistoryId'
-        DESC 'Id of an entry in a printer history of jobs'
-        EQUALITY integerMatch
-        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
+# pykotaJobId
+attributetype ( 1.3.6.1.4.1.16868.1.1.11 NAME 'pykotaJobId'
+        DESC 'Id of a job in a printer history of jobs'
+        EQUALITY caseExactIA5Match
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.13 NAME 'pykotaJobId'
-        DESC 'Id of a job in a printer history of jobs'
-        EQUALITY integerMatch
-        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.16868.1.1.14 NAME 'pykotaPrinterPageCounter'
+# pykotaPrinterPageCounter
+attributetype ( 1.3.6.1.4.1.16868.1.1.12 NAME 'pykotaPrinterPageCounter'
         DESC 'Life time page counter of a printer when the job began'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.15 NAME 'pykotaJobSize'
+# pykotaJobSize
+attributetype ( 1.3.6.1.4.1.16868.1.1.13 NAME 'pykotaJobSize'
         DESC 'Current job size in number of pages in the history'
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
 
-attributetype ( 1.3.6.1.4.1.16868.1.1.16 NAME 'pykotaAction'
+# pykotaAction
+attributetype ( 1.3.6.1.4.1.16868.1.1.14 NAME 'pykotaAction'
         DESC 'Was the job allowed, or denied'
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
         
-attributetype ( 1.3.6.1.4.1.16868.1.1.17 NAME 'pykotaJobDate'
-        DESC 'Date of when the job began'
+# pykotaPrinterName        
+attributetype ( 1.3.6.1.4.1.16868.1.1.15 NAME 'pykotaPrinterName'
+        DESC 'PyKota printer name as received from the printing subsystem'
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaUserName        
+attributetype ( 1.3.6.1.4.1.16868.1.1.16 NAME 'pykotaUserName'
+        DESC 'PyKota user name'
+        EQUALITY caseExactIA5Match
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaGroupName        
+attributetype ( 1.3.6.1.4.1.16868.1.1.17 NAME 'pykotaGroupName'
+        DESC 'PyKota group name'
+        EQUALITY caseExactIA5Match
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+# pykotaLastJobUUID        
+attributetype ( 1.3.6.1.4.1.16868.1.1.18 NAME 'pykotaLastJobUUID'
+        DESC 'Last job uuid in the history'
+        EQUALITY caseExactIA5Match
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
+        
+#        
+# PyKota Object Classes
+#
 
-
-## New Pykota User object type
-objectclass ( 1.3.6.1.4.1.16868.1.2.1 NAME 'pykotaUser' SUP top AUXILIARY
+# pykotaUser
+objectclass ( 1.3.6.1.4.1.16868.1.2.1 NAME 'pykotaAccount' SUP top AUXILIARY
         DESC 'PyKota Auxiliary User Account'
-        MUST ( uid )
-        MAY  ( pykotaLimitBy $ pykotaBalance $ pykotaLifeTimePaid ) )
+        MUST ( uid $ pykotaUserName )
+        MAY  ( pykotaLimitBy ) )
         
-## New Pykota Group object type
+# pykotaGroup        
 objectclass ( 1.3.6.1.4.1.16868.1.2.2 NAME 'pykotaGroup' SUP top AUXILIARY
         DESC 'PyKota Auxiliary Group'
-        MUST ( cn )
-        MAY  ( pykotaLimitBy ) )
+        MUST ( cn $ pykotaGroupName )
+        MAY  ( pykotaLimitBy $ memberUid ) )
         
-## New Pykota Printer object type
-objectclass ( 1.3.6.1.4.1.16868.1.2.3 NAME 'pykotaPrinter' SUP top STRUCTURAL
+# pykotaPrinter        
+objectclass ( 1.3.6.1.4.1.16868.1.2.3 NAME 'pykotaPrinter' SUP top AUXILIARY
         DESC 'PyKota Printer'
-        MUST ( pykotaPrinterName )
+        MUST ( cn $ pykotaPrinterName )
         MAY  ( pykotaPricePerPage $ pykotaPricePerJob ) )
         
-## New PyKota User Print Quota on a Printer        
-objectclass ( 1.3.6.1.4.1.16868.1.2.4 NAME 'pykotaUserPQuota' SUP top STRUCTURAL
+# pykotaUserPQuota        
+objectclass ( 1.3.6.1.4.1.16868.1.2.4 NAME 'pykotaUserPQuota' SUP top AUXILIARY
         DESC 'PyKota User Quota on a Printer'
-        MUST ( uid )
+        MUST ( cn $ pykotaUserName $ pykotaPrinterName )
         MAY  ( pykotaPageCounter $ pykotaLifePageCounter $ pykotaSoftLimit $ pykotaHardLimit $ pykotaDateLimit ) )
         
-## New PyKota Group Print Quota on a Printer        
-objectclass ( 1.3.6.1.4.1.16868.1.2.5 NAME 'pykotaGroupPQuota' SUP top STRUCTURAL
+# pykotaGroupPQuota        
+objectclass ( 1.3.6.1.4.1.16868.1.2.5 NAME 'pykotaGroupPQuota' SUP top AUXILIARY
         DESC 'PyKota Group Quota on a Printer'
-        MUST ( cn )
+        MUST ( cn $ pykotaGroupName $ pykotaPrinterName )
         MAY  ( pykotaSoftLimit $ pykotaHardLimit $ pykotaDateLimit ) )
         
-## New PyKota Job entry in a Printer's history        
-objectclass ( 1.3.6.1.4.1.16868.1.2.6 NAME 'pykotaPrinterJob' SUP top STRUCTURAL
+# pykotaJob        
+objectclass ( 1.3.6.1.4.1.16868.1.2.6 NAME 'pykotaJob' SUP top AUXILIARY
         DESC 'An entry in the job history for a printer'
-        MUST ( pykotaJobHistoryId $ uid $ pykotaJobId )
-        MAY  ( pykotaPrinterPageCounter $ pykotaJobSize $ pykotaAction $ pykotaJobDate ) )
+        MUST ( cn $ pykotaUserName $ pykotaPrinterName $ pykotaJobId )
+        MAY  ( pykotaPrinterPageCounter $ pykotaJobSize $ pykotaAction ) )
         
+# pykotaAccountBalance
+objectclass ( 1.3.6.1.4.1.16868.1.2.7 NAME 'pykotaAccountBalance' SUP top AUXILIARY
+        DESC 'PyKota User account balance'
+        MUST ( pykotaUserName )
+        MAY  ( pykotaBalance $ pykotaLifeTimePaid ) )
+        
+# pykotaLastJob        
+objectclass ( 1.3.6.1.4.1.16868.1.2.8 NAME 'pykotaLastJob' SUP top AUXILIARY
+        DESC 'Last job information for a printer'
+        MUST ( pykotaPrinterName $ pykotaLastJobUUID ) )
+        
+# pykotaNamed - Use it if you have to 
+objectclass ( 1.3.6.1.4.1.16868.1.2.9 NAME 'pykotaNamed' SUP top STRUCTURAL
+        DESC 'PyKota Named Object'
+        MUST ( cn ) )
+        
+        
