UserDelegate.js revision 2d7019e19039fd083850f76e54b6b26a7b06a8f2
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright © 2011 ForgeRock AS. All rights reserved.
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*/
/*global $, define */
/**
* @author yaromin
*/
"app/comp/main/Configuration",
obj.usersCallback = null;
if(successCallback) {
}
}, error: errorCallback} );
};
//TODO this is only test utility method should be moved to the special test package
obj.removeAllUsers = function() {
var serviceInvokerConfig, finished, serviceInvokerModuleName = "app/comp/common/delegate/ServiceInvoker";
finished = 0;
obj.getAllUsers(function() {
var i, successCallback;
successCallback = function(){
finished++;
}
};
}
});
};
/**
* Check credentials method
*/
var headers = {};
if(errorCallback) {
}
} else if(successCallback) {
}
},
});
};
/**
* Check security answer method
*/
url: "/?_query-id=for-security-answer&" + $.param({uid: uid, securityanswer: securityAnswer.toLowerCase()}),
if(errorCallback) {
}
} else if(successCallback) {
}
},
});
};
} else if(successCallback) {
}
},
});
};
if(errorCallback) {
}
} else if(successCallback) {
}
},
});
};
/**
* UserName availability check.
* If userName is available successCallback(true) is invoked, otherwise successCallback(false) is invoked
* If error occurred, errorCallback is invoked.
*/
if(successCallback) {
successCallback(true);
} else {
successCallback(false);
}
}
},
});
};
var callParams = {
url: "/",
headers: { },
success: function () {
},
error: function () {
}
};
};
/**
* See AbstractDelegate.patchEntityDifferences
*/
obj.patchUserDifferences = function(oldUserData, newUserData, successCallback, errorCallback, noChangesCallback) {
obj.patchEntityDifferences({"_query-id": "for-userName", uid: oldUserData.userName.toLowerCase()}, oldUserData, newUserData, successCallback, errorCallback, noChangesCallback);
};
/**
* See AbstractDelegate.patchEntity
*/
obj.patchSelectedUserAttributes = function(userName, patchDefinitionObject, successCallback, errorCallback, noChangesCallback) {
obj.patchEntity({"_query-id": "for-userName", uid: userName.toLowerCase()}, patchDefinitionObject, successCallback, errorCallback, noChangesCallback);
};
return obj;
});