[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5504] trunk/LedgerSMB/Group.pm



Revision: 5504
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5504&view=rev
Author:   einhverfr
Date:     2013-01-07 10:04:05 +0000 (Mon, 07 Jan 2013)
Log Message:
-----------
Including accidently omitted LedgerSMB::Group

Added Paths:
-----------
    trunk/LedgerSMB/Group.pm

Added: trunk/LedgerSMB/Group.pm
===================================================================
--- trunk/LedgerSMB/Group.pm	                        (rev 0)
+++ trunk/LedgerSMB/Group.pm	2013-01-07 10:04:05 UTC (rev 5504)
@@ -0,0 +1,68 @@
+=head1 NAME
+
+LedgerSMB::Group - Group Management for LedgerSMB
+
+=head1 SYNPOSIS
+
+To create a group, add roles, and save it:
+
+  my $grp = LedgerSMB::Group->new(%$request);
+  $grp->roles(..hidden..);
+  $grp->save;
+
+To retrieve a role from the db:
+
+  my $grp->get($name);
+
+=cut
+
+package LedgerSMB::Group;
+use Moose;
+with 'LedgerSMB::DBObject_Moose';
+
+=head1 PROPERTIES
+
+=over
+
+=item Str name
+
+This is the name of the group role, minus the prefix.
+
+=cut
+
+has name => (is => 'ro', isa => 'Str', required => 1);
+
+=item Str fqname
+
+This is the name of the group role including the prefix.
+
+=cut
+
+has fqname => (is => 'ro', isa => 'Str', required => 1);
+
+=item Arrayref[Str] roles
+
+Roles granted to group role.
+
+=cut
+
+has roles => (is => 'rw', isa => 'ArrayRef[Str]', required => 0);
+
+=back
+
+=head1 METHODS
+
+=over
+
+=item get
+
+=item save
+
+=back
+
+=head1 COPYRIGHT
+
+=cut
+
+1;
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.