adding profile schema api, and matt is a dirty bitch
This commit is contained in:
parent
53ab84ccff
commit
cbf2e4bbbe
2 changed files with 366 additions and 0 deletions
154
lib/WebGUI/ProfileCategory.pm
Normal file
154
lib/WebGUI/ProfileCategory.pm
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
package WebGUI::ProfileCategory;
|
||||
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
this software.
|
||||
-------------------------------------------------------------------
|
||||
http://www.plainblack.com info@plainblack.com
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::ProfileCategory
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This package is used to manipulate the organization of the user profiling system.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::ProfileCategory;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These methods are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 create ( [ properties] )
|
||||
|
||||
Add a new category to the system. Returns a WebGUI::ProfileCategory object if created successfully, otherwise returns undef.
|
||||
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the properties of this field. See the set() method for details.
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 delete ()
|
||||
|
||||
Deletes this category and all fields attached to it.
|
||||
|
||||
=cut
|
||||
|
||||
sub delete {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 get ( [ property ] )
|
||||
|
||||
Returns a hash reference of all the properties of the category.
|
||||
|
||||
=head3 property
|
||||
|
||||
If specified, the value of an individual property is returned.
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveDown ()
|
||||
|
||||
Moves this category down one position.
|
||||
|
||||
=cut
|
||||
|
||||
sub moveDown {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveUp ()
|
||||
|
||||
Moves this field up one position.
|
||||
|
||||
=cut
|
||||
|
||||
sub moveUp {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 new ( id )
|
||||
|
||||
Constructor
|
||||
|
||||
=head3 id
|
||||
|
||||
The unique id of this category.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 set ( properties )
|
||||
|
||||
Update the profile field properties.
|
||||
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the properties to be updated.
|
||||
|
||||
=head4 label
|
||||
|
||||
A perl structure that will return a scalar. Defaults to 'Undefined'.
|
||||
|
||||
=head4 visible
|
||||
|
||||
A boolean indicating whether this field should be visible when a user views a user's profile.
|
||||
|
||||
=head4 editable
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
||||
212
lib/WebGUI/ProfileField.pm
Normal file
212
lib/WebGUI/ProfileField.pm
Normal file
|
|
@ -0,0 +1,212 @@
|
|||
package WebGUI::ProfileField;
|
||||
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
this software.
|
||||
-------------------------------------------------------------------
|
||||
http://www.plainblack.com info@plainblack.com
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::ProfileField
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This package is used to manipulate the schema of the user profiling system. If you wish to manipulate the profile data for an individual user look at WebGUI::User.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::ProfileField;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These methods are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 create ( fieldName [, properties] )
|
||||
|
||||
Add a new field to the system. Returns a WebGUI::ProfileField object if created successfully, otherwise returns undef.
|
||||
|
||||
=head3 fieldName
|
||||
|
||||
The unique name of this field.
|
||||
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the properties of this field. See the set() method for details.
|
||||
|
||||
=cut
|
||||
|
||||
sub create {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 delete ()
|
||||
|
||||
Deletes this field and all user data attached to it.
|
||||
|
||||
=cut
|
||||
|
||||
sub delete {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 formField ()
|
||||
|
||||
Returns an HTMLified form field element.
|
||||
|
||||
=cut
|
||||
|
||||
sub formField {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 formProcess ()
|
||||
|
||||
Returns the value retrieved from a form post.
|
||||
|
||||
=cut
|
||||
|
||||
sub formProcess {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 get ( [ property ] )
|
||||
|
||||
Returns a hash reference of all the properties of the field.
|
||||
|
||||
=head3 property
|
||||
|
||||
If specified, the value of an individual property is returned.
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveDown ()
|
||||
|
||||
Moves this field down one position within it's category.
|
||||
|
||||
=cut
|
||||
|
||||
sub moveDown {
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 moveUp ()
|
||||
|
||||
Moves this field up one position within it's category.
|
||||
|
||||
=cut
|
||||
|
||||
sub moveUp {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 new ( fieldName )
|
||||
|
||||
Constructor
|
||||
|
||||
=head3 fieldName
|
||||
|
||||
The unique name of this field.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 rename ( newFieldName )
|
||||
|
||||
Renames this field. Returns a 1 if successful and a 0 if not.
|
||||
|
||||
=head3 newFieldName
|
||||
|
||||
The new name this field should take.
|
||||
|
||||
=cut
|
||||
|
||||
sub rename {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 set ( properties )
|
||||
|
||||
Update the profile field properties.
|
||||
|
||||
=head3 properties
|
||||
|
||||
A hash reference containing the properties to be updated.
|
||||
|
||||
=head4 label
|
||||
|
||||
A perl structure that will return a scalar. Defaults to 'Undefined'.
|
||||
|
||||
=head4 visible
|
||||
|
||||
A boolean indicating whether this field should be visible when a user views a user's profile.
|
||||
|
||||
=head4 required
|
||||
|
||||
=head4 protected
|
||||
|
||||
=head4 editable
|
||||
|
||||
=head4 fieldType
|
||||
|
||||
=head4 possibleValues
|
||||
|
||||
=head4 defaultValues
|
||||
|
||||
=head4 categoryId
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue