anchor.diff:              error(missing_parameter)
       end;
   
  -
  -action(user, get, Args) ->
  -    case getopt(["uid"], Args, [none]) of
  -        {[[Uid]], _} ->
  -            case call(user, get, [Uid]) of
  -                {ok, Record} ->
  -                    display(json, Record, record_info(fields, uce_user));
  -                {error, Reason} ->
  -                    error(Reason)
  -            end;
  -        {[none], _} ->
  -            error(missing_parameter)
  -    end;
  -
   action(user, update, Args) ->
  -    case getopt(["uid", "auth", "credential"], Args) of
  -        {[[Uid], [Auth], [Credential]], Metadata} ->
  -            case call(user, update, [#uce_user{uid=Uid,
  -                                               auth=Auth,
  -                                               credential=Credential,
  -                                               metadata=Metadata}]) of
  +    case getopt(["domain", "uid", "auth", "credential"], Args) of
  +        {[none, _, _, _], _Metadata} ->
  +            error(missing_parameter);
  +        {[_, none, _, _], _Metadata} ->
  +            error(missing_parameter);
  +        {[_, _, none, _], _Metadata} ->
  +            error(missing_parameter);
  +        {[_, _, _, none], _Metadata} ->
  +            error(missing_parameter);
  +        {[[Domain], [Uid], [Auth], [Credential]], Metadata} ->
  +            case call(user, update, [Domain, #uce_user{uid=Uid,
  +                                                       auth=Auth,
  +                                                       credential=Credential,
  +                                                       metadata=Metadata}]) of
                   {ok, updated} ->
                       success(updated);
                   {error, Reason} ->
                       error(Reason)
  -            end;
  -        {[_Uid, _Auth, _Credential], _Metadata} ->
  -            error(missing_parameter)
  -    end;
  -
  -action(user, list, _) ->
  -    case call(user, list, []) of
  -        {ok, Records} ->
  -            display(json, Records, record_info(fields, uce_user));
  -        {error, Reason} ->
  -            error(Reason)
  +            end
  +    end;
  +
  +action(user, list, Args) ->
  +    case getopt(["domain"], Args) of
  +        {[none], _} ->
  +            error(missing_parameter);
  +        {[[Domain]], _} ->
  +            case call(user, list, [Domain]) of
  +                {ok, Records} ->
  +                    display(json, Records, record_info(fields, uce_user));
  +                {error, Reason} ->
  +                    error(Reason)
  +            end
       end;
   
   %%
  
positive.code: %% ACL
  %%
  action(acl, add, Args) ->
      case getopt(["uid", "meeting", "object", "action"],
                  Args,
                  [none, [""], none, none]) of
          {[[Uid], [Meeting], [Object], [Action]], Conditions} ->
              case call(acl, add, [#uce_acl{uid=Uid,
                                            location=[Meeting],
                                            object=Object,
                                            action=Action,
                                            conditions=Conditions}]) of
                  {ok, created} ->
                      success(created);
                  {error, Reason} ->
                      error(Reason)
              end;
          {[_Uid, _Meeting, _Object, _Action], _Conditions} ->
              error(missing_parameter)
      end;
  
  action(acl, delete, Args) ->
      case getopt(["uid", "meeting", "object", "action"],
                  Args, [none, [""], none, none]) of
          {[[Uid], [Meeting], [Object], [Action]], Conditions} ->
              case call(acl, delete, [Uid, Object, Action, [Meeting], Conditions]) of
                  {ok, deleted} ->
                      success(deleted);
                  {error, Reason} ->
                      error(Reason)
              end;
          {[_Uid, _Meeting, _Object, _Action], _Conditions} ->
              error(missing_parameter)
      end;
  
  action(acl, check, Args) ->
      case getopt(["uid", "meeting", "object", "action"],
                  Args,
                  [none, [""], none, none]) of
          {[[Uid], [Meeting], [Object], [Action]], Conditions} ->
              case call(acl, check, [Uid, Object, Action, [Meeting], Conditions]) of
                  {ok, true} ->
                      success(true);
                  {ok, false} ->
                      success(false);
                  {error, Reason} ->
                      error(Reason)
              end;
          {[_Uid, _Meeting, _Object, _Action], _Conditions} ->
              error(missing_parameter)
      end;
  
  %%
  
negative.code: %% Meeting
  %%
  action(meeting, add, Args) ->
      case getopt(["domain", "name", "start", "end"], Args) of
          {[none, _, _, _], _Metadata} ->
              error(missing_parameter);
          {[_, none, _, _], _Metadata} ->
              error(missing_parameter);
          {[[Domain], [Name], Start, End], Metadata} ->
              case call(meeting, add, [Domain, #uce_meeting{id=[Name],
                                                            start_date=parse_date(Start),
                                                            end_date=parse_date(End),
                                                            metadata=Metadata}]) of
                  {ok, created} ->
                      success(created);
                  {error, Reason} ->
                      error(Reason)
              end
      end;
  
  action(meeting, delete, Args) ->
      case getopt(["domain", "name"], Args) of
          {[none, _], _} ->
              error(missing_parameter);
          {[_, none], _} ->
              error(missing_parameter);
          {[[Domain], [Name]], _} ->
              case call(meeting, delete, [Domain, [Name]]) of
                  {ok, deleted} ->
                      success(deleted);
                  {error, Reason} ->
                      error(Reason)
              end
      end;
  
  action(meeting, get, Args) ->
      case getopt(["domain", "name"], Args) of
          {[none, _], _} ->
              error(missing_parameter);
          {[_, none], _} ->
              error(missing_parameter);
          {[[Domain], [Name]], _} ->
              case call(meeting, get, [Domain, [Name]]) of
                  {ok, Record} ->
                      display(json, Record, record_info(fields, uce_meeting));
                  {error, Reason} ->
                      error(Reason)
              end
      end;
  
  action(meeting, update, Args) ->
      case getopt(["domain", "name", "start", "end"], Args) of
          {[none, _, _, _], _Metadata} ->
              error(missing_parameter);
          {[_, none, _, _], _Metadata} ->
              error(missing_parameter);
          {[[Domain], [Name], Start, End], Metadata} ->
              case call(meeting, update, [Domain, #uce_meeting{id=[Name],
                                                               start_date=parse_date(Start),
                                                               end_date=parse_date(End),
                                                               metadata=Metadata}]) of
                  {ok, updated} ->
                      success(updated);
                  {error, Reason} ->
                      error(Reason)
              end
      end;
  
  action(meeting, list, Args) ->
      Res = case getopt(["domain", "status"], Args) of
                {[none, _], _} ->
                    {error, missing_parameter};
                {[_, none], _} ->
                    {error, missing_parameter};
                {[[Domain], [Status]], _} ->
                    call(meeting, list, [Domain, Status])
            end,
      case Res of
          {ok, Records} ->
  