Commit graph

8735 commits

Author SHA1 Message Date
Colin Kuskie
bf097ac337 Since assets are always created with defaults now, no need to introspect. Also, remove white space in "empty" lines. 2010-01-13 11:15:25 -08:00
Colin Kuskie
2aefb5d316 Switch from defaultValue to Moose's built-in default 2010-01-13 11:14:52 -08:00
Colin Kuskie
a8f251a5f2 Sessionize addRevision 2010-01-13 10:31:22 -08:00
Colin Kuskie
22823339ab Sessionize addChild 2010-01-13 10:30:29 -08:00
Colin Kuskie
e0089f37f8 write work, no tests 2010-01-09 09:32:10 -08:00
Colin Kuskie
54ed6f7e9e Incremental change to write method in Asset.pm. Actual code to follow soon. 2010-01-08 09:11:35 -08:00
Colin Kuskie
ed752a25c3 Make WebGUI::Definition property methods work the same way that Moose attribute methods do.
Specifically, get_property_list does not return property names from all classes.  Add a new
method to do that.  Refactor and reuse lots of code.
2010-01-08 09:04:27 -08:00
Colin Kuskie
49992dddb9 move get_tables back into Meta/Class. Refactor it to use get_all_class_metas instead of iterating over all the properties. 2010-01-07 18:25:45 -08:00
Colin Kuskie
15c5318a27 Encapsulate a method to return all the meta objects for classes used by an object.
Refactor the code out of get_all_properties into its own method.  This will be
used by the write method in Asset.pm, at least.
2010-01-07 18:15:40 -08:00
Colin Kuskie
0627d7adbf add uiLevel asset attribute. Begin to work on write. 2010-01-04 19:14:53 -08:00
Colin Kuskie
bfccc1fa6f Fix syntax errors in Snippet definition. 2010-01-04 19:14:32 -08:00
Colin Kuskie
ce3edcf743 Move get_tables from Meta/Class into Meta/Asset. s/getTables/meta->get_tables/; 2010-01-04 15:34:24 -08:00
Colin Kuskie
b72e3a1cd1 getClassById encapculates getting a className from the database, indexed by assetId.
Also, work on newById, newByUrl.
2010-01-04 11:33:09 -08:00
Colin Kuskie
fde81306c6 Asset work related to class dispatch. 2010-01-04 10:59:48 -08:00
Colin Kuskie
1af2acbc9d Conversion from static to Moose for Snippet. 2010-01-04 10:59:31 -08:00
Colin Kuskie
22ff856027 add revisionDate attribute 2010-01-01 19:31:24 -08:00
Colin Kuskie
9ff9f31f14 Add more asset data attributes. 2010-01-01 09:32:13 -08:00
Colin Kuskie
38144bd58f Add assetId attribute to Asset.pm, and tests. 2009-12-30 08:35:21 -08:00
Colin Kuskie
f76842f705 Tinkering with url. 2009-12-29 12:05:31 -08:00
Colin Kuskie
d7a31ea901 Try to centralize all the menuTitle defaults in 1 place. 2009-12-28 18:37:53 -08:00
Colin Kuskie
6733595dfc Fix title, menuTitle and url around modifiers. Tests for title, menuTitle.
menuTitle is set to be lazy because it depends on title as a default.
2009-12-28 18:36:19 -08:00
Colin Kuskie
49bd7f5032 newByDynamicClass changed to newById 2009-12-27 19:08:15 -08:00
Colin Kuskie
0fd922daed First work with BUILDARGS. Set defaults for the title,menuTitle. Some tests in t/Asset.t
From this point forward, WebGUI::Asset->new($session, $assetId)
will only return the Root node, and not any other classes.
2009-12-27 19:05:20 -08:00
Colin Kuskie
5574cdf9b0 newByPropertyHashRef. Tolerate an empty properties hashref. Call $className->new.
Allow propeties hashref to be empty, and take class from invocant.
Add a session attribute.
Change around->extraHeadTags to after->extraHeadTags.
2009-12-21 14:46:29 -08:00
Colin Kuskie
030f6bccf0 Force set to process properties in insertion order.
Note, we should look for a way to make this more efficient.
2009-12-18 15:28:10 -08:00
Colin Kuskie
8837185bce Set aside Asset.pm's update, so we can fallback to using the one in Definition::Role::Object 2009-12-18 14:58:10 -08:00
Colin Kuskie
ec5f610701 Moose seems to clean this class of anything that it uses. Changed bare calls to croak to Carp::croak. 2009-12-18 13:09:03 -08:00
Colin Kuskie
0e90ad00b8 Set up filtering on title, menuTitle and URL. This is done via "around". 2009-12-18 12:59:01 -08:00
Colin Kuskie
0c4710c4ad code formatting in the properties. 2009-12-18 11:45:54 -08:00
Colin Kuskie
ed0eeb9bc5 Merge branch 'moose-definition' into static_definition. Moved Asset.pm over to the new Definition. 2009-12-18 11:40:33 -08:00
Colin Kuskie
456eb6f39a Fix POD, condense Asset attributes. A test for tableName in the constructor. 2009-12-17 18:07:47 -08:00
Colin Kuskie
e1be2f9319 Make fieldType a required property option. Check for the presence of either noFormPost or label. 2009-12-17 13:25:27 -08:00
Colin Kuskie
3b31069b1c Make fieldType a required parameter of a Definition Asset property. 2009-12-17 13:00:54 -08:00
Colin Kuskie
c93bdc7950 add get_tables, and refactor out get_all_properties from get_property_list 2009-12-16 15:13:15 -08:00
Colin Kuskie
5b5d4783d0 Make get_property_list API compatible with get_attribute_list, by returning an array. 2009-12-16 13:31:48 -08:00
Colin Kuskie
64fc4a231d Define what the assetName accessor returns. 2009-12-16 13:31:27 -08:00
Colin Kuskie
059bd6761d Uniqueness check on attribute names in get_property_list. Add tests for that, and for get_attributes 2009-12-11 11:56:16 -08:00
Colin Kuskie
334f3414c3 Handle insertion order in multiple classes. This breaks overriding properties in the Definition. 2009-12-11 10:54:23 -08:00
Colin Kuskie
812c2e4c37 Finish up POD for Definition::Role::Object 2009-12-10 19:46:14 -08:00
Colin Kuskie
19b784cd95 Fix get_property_list. Add tests. 2009-12-10 18:54:18 -08:00
Colin Kuskie
0f3260131d Add POD. Use meta->find_attribute_by_name instead of can. Use get_property_list instead of get_all_properties. Change set to ignore bad properties instead of ending the set. 2009-12-10 17:48:23 -08:00
Colin Kuskie
849e8d4037 Change get_property_list from an attribute to a method in Definition::Meta::Class. 2009-12-10 15:54:49 -08:00
Graham Knop
2c7eb7478e change table to tableName in definition 2009-12-07 12:22:33 -06:00
Graham Knop
bb2667206d adding some methods to role, other small cleanups 2009-12-07 12:16:07 -06:00
Graham Knop
c7995b716e Fix applying roles 2009-12-07 12:15:21 -06:00
Graham Knop
fdb72a6d7f small adjustments 2009-12-07 11:29:03 -06:00
Colin Kuskie
b6058e8b11 Began POD for WebGUI::Definition::Asset 2009-12-05 19:06:05 -08:00
Colin Kuskie
129f675f29 POD for WebGUI::Definition::Meta::Property::Asset 2009-12-05 14:23:13 -08:00
Colin Kuskie
841f9418a8 POD for WebGUI::Definition::Meta::Property 2009-12-05 14:22:21 -08:00
Colin Kuskie
d78359c13a POD for Definition::Meta::Class 2009-12-05 13:53:05 -08:00