def save
            unless [ :handle, :new, :modify, :save ].all?{|method| api_methods[method] }
                raise "Not all necessary api methods are defined to process this action!"            
            end
            entry = self.class.find_one(name)
            self.class.in_transaction(true) do |token|
                if entry
                    entryid = self.class.make_call(api_methods[:handle],name,token) 
                else
                    entryid = self.class.make_call(api_methods[:new],token)
                    self.class.make_call(api_methods[:modify],entryid,'name', name, token)
                end
                
                cobbler_record_fields.each do |field|
                    field_s = field.to_s
                    if !locked_fields.include?(field) && user_definitions.has_key?(field_s)
                        self.class.make_call(api_methods[:modify],entryid,field_s, user_definitions[field_s], token)
                    end
                end
                
                cobbler_collections_store_callbacks.each do |callback|
                    send(callback,entryid,token)
                end
                
                self.class.make_call(api_methods[:save],entryid,token)
            end
        end
def save
            unless [ :handle, :new, :modify, :save ].all?{|method| api_methods[method] }
                raise "Not all necessary api methods are defined to process this action!"            
            end
            entry = self.class.find_one(name)
            self.class.in_transaction(true) do |token|
                if entry
                    entryid = self.class.make_call(api_methods[:handle],name,token) 
                else
                    entryid = self.class.make_call(api_methods[:new],token)
                    self.class.make_call(api_methods[:modify],entryid,'name', name, token)
                end
                
                cobbler_record_fields.each do |field|
                    field_s = field.to_s
                    if !locked_fields.include?(field) && user_definitions.has_key?(field_s)
                        self.class.make_call(api_methods[:modify],entryid,field_s, user_definitions[field_s], token)
                    end
                end
                
                cobbler_collections_store_callbacks.each do |callback|
                    send(callback,entryid,token)
                end
                
                self.class.make_call(api_methods[:save],entryid,token)
            end
        end
Save an item on the remote cobbler server
 This will first lookup if the item already exists on the remote server
 and use its handle store the attributes. Otherwise a new item is created.