/// class PD.Commands.CommandUtil

PD.Commands.CommandUtil =
Class.extend({

});

PD.Commands.CommandUtil.splitPath =
function (commandPath) {

    var pieces = null,
        result = {
            contextId: null,
		    groupId: null,
		    commandId: null,
            path: commandPath
	    };

    if (commandPath != null) {

        pieces = commandPath.toString().split(":");

        switch (pieces.length) {
            case 1:
                result.commandId = pieces[0];
                break;
            case 2:
                result.groupId = pieces[0];
                result.commandId = pieces[1];
                break;
            case 3:
                result.contextId = pieces[0];
                result.groupId = pieces[1];
                result.commandId = pieces[2];
                break;
        }

	}

	return result;

};