Add some new methods into this class.
Add some new methods in this class.
Add some new methods in it. Remove openDBconnection part to DBConnection class.
Add some new attributes and methods in it.
Add a new class named DBConnectionPool. This class will create DBConnection pool and other user can get or return connection to it.
Add this new class into meta package. DBConnection class repsent a conncetion and its information.
Add setCookie method in this class. Junit test class need this method.
Add a access control for MetaCatServlet to update a document which home server is not local metacat.
Add a control to accept data or not
Add two controls to send or accept data.
Add control to send data or not
Add two control for send or accept data file
In writeDocumentToDB method, during insert action, rev value can be assigned too. It is useful for replication.
Revised update method.
Add a control to get data file granted in handleUploadMethod.
Revised the method writeDataFile, writeReplication and writeToDB
Revise Update method.
Apply DocumentImp.writeReplication and DocumentImp.writeDataFile in deltaT replication
Fixed some db connection problem
Fixed some db connection bug.
Delete a some useless code for connection pool
Fixed some DB connection bug.
Assign debug level to parser. (it level is 50)
Use DocumentImpl.getDocHomeServer method to get home server in method handleGetDocumentInfo
Change the method getLocalReplicationServerName to be static
Add the feature to get doc home server into method getDocumentInfo.Add a method to return docHomeServer.
Fixed a bug in method getHomeServer
Revise the method getDocumentInfo. Home server of documnet is added in it.
Revised handleUploadRequet.
Add three methods into this class. One is named getServerCode, to given a server name, it return server code in xml_replication table.One named insertServerIntoReplicationTable, if a server is not in the server list, it will insert it.One is named WriteReplication, this method will be used in forceReplication. It delete the replication code in it.
Delete the control that when action="insert", rev should be 1
Overload a method debugMessage(String msg, int debugLevel)User can set a debugLevel for this message. If debugLevel is less than the default a value in build.xml, this message will be printed.If user set a value less than or equals 0, debugLevel will be set automatically to 1. So we can set default value to 0 in build.xml file and close all debug message.
Add two methods getHomeServer and getServerLocation. Given a docid, getHomeServer can get the information of its home host. Given a docid, getServerLocation can return server code for it.
In handleUpdateRequest method, if a metacat was configured to be hub super, it can provide any documents in its database. If the metacat is notsuper, it only provide the documents list which home host is itself.
Adding a hub control to data file in handleUpLoad method. Data file was changed can be replicate to all server or only home host.
Add a hashtable - server list as a class variable. So programmer have a control to the server list which will be forced to replicate.
Add a hub control in write and writeData method. If hub==super, metacat can replicate any document in its database to any server in server list. If it is not super, metacat only replicate local documents to any server in server list. If a document' home host is not itself, metacat only force replicate the document to the document's home host.
In update method, adding some code to handle replicate data file. Fixed the bug in deleting documents.
Making parser to handle datafile attribute in parsing updated doclist.
Add a new attribute in updated doc list: data file. So from this attribute, we can tell which document is a data file.
In writeDataFile method, using getDataFileLockGrant(docid) replace getDataFileLockGrant(docid, serverCode). The latter will cause a problem
Add two controls for handle replication server list is empty and updated document list is empty
Using DocumentImpl.writeDataFile method in handleReplicateDataFileRequest. Make code simple.
Add a control to handle if the server list is empty.
Add a method named writeDataFile. This method will register data file into xml_documents table and save a input stream to a file.
Adding a new feature that in uploaddatafile that the datafile can be replicated.
Adding a control which can turn on or off replcation data file.
Add method getDataFileLockGrant(). This method will check if xml-document of data file can be store into database.
Add two method: handleGetDataFileRequest and handleForceReplicateDataFile. The two methods will handle data file replication.
Adding handle force replication data file part.
Add a new method named unRegisterDocument. This method will delete the record in xml_document table which is for a data file
Figure out the configuration issue about replication. If metacat was configured to set replication off in build.xml, it will reject replication.
Adding a method named handleGetDataFileRequest. User can download data file from replcication now.
Currently, some document in xml_document table doesn't have entries inxml_access table. This is okay during the old access policy.But we changed the access policy( see bug 437 ) and if there is no entry inxml_access table, except owner, other person can not access it....
Fixed the bug that handle force replication
Fixed the bug that to handle forceReplication action
Add a method named getLocalReplicationServerName
Fixed the bug metacat will set server location to 1, no matter it is.
Fixed the getall didn't work. Now local host can insert or update documents from remote host.But still there some problem on force replcation.
Fixed getGroup method return a exception and cause authenticate failed.
Fixed the getIdentifyingName() sub so that it properly looks up someonesDN if passed in a DN that is an alias. This is mainly important forsites like PISCO that use a different root to their tree than theecoinformatics.org tree. Now we can successfully authenticate againast...
Some changes for pisco.
turned debug off for the release
hopefully fixed the connection closed error.
fixed groups error, I hope.
fixed auth bug
updated authldap to get the groups to work (king of)
Method getGourps was revised. Attributes variables were set there. Other wise, when it caught a referral exception and started a thread, this will caused a exception problem. When string array groups were returned by method getGroups in getPrincipals method, we should check if the groups is null or not. Otherwise it will cause a exception problem. This revise is for bug 445.
In hasPermission method, a situation was considered: if no user and group, the permssion will be true. This is for the command line invocation.
Method endElement in AccessControList was revised. A feature that put access document itset into xml_access was added.
In hasPermission method, a rule for access document is implements. If user want to write a access document, it should hhave "all" permission.The permission for access document now is looking up in xml_access table directly, rather get same permission to data set document.
In order to increase data file docid, method registerDocument was revised. Now it not only insert a new data file record to xml_documents table, but also can update the data file documents. Moreover, it can archieve the old version to xml_revisions table. Two other private methods were added to handl these futures: deleteXMLDocuments and getLatestRevisionNumber.
fixed my tagging error
some small changes I had to make to get the QAENGINE demo to work right. this should be committing in a branch
We decided that the permission for a user to an access documents is as same as to the data set document(which contains the access document). In order to do this, we need to look-up xml-relation table. If we could find the data set document id, just check the id. If we couldn't find one, we need check if the user is owner. If it is, has permission. Otherwise, doesn't have.
Add a new method getDataSetId to the class. The permission policy for access documents is: the user will have the same permission as data set file. (There is no entry in xml_access table for access document.
Add a throwing exception in hasPermission and hasReadPermission methods.
Add a throwing exception in haspermission method.
A constructor for this class was added. In the new constructor, user can specify the revision number he want to update. In method writeDocumentToDB, when a update action happend, the rev number would not automatictlly to add one, but it can go to specified number. This is for bug 417.
A constructor was added to this class. In this constructor, user can specify the revision number he want to update. And the number can be passed into a DocumentImpl object constructor in startElement method. But the number should be greater than current number in database.
A method named getLastRevisionNumber was added. And condition for checking accession number was revised too. Now metacat wouldn't refuse a revsion number which is 2 or more greater than current revision number in the database. This is for bug 417.
Access document was added to exported data package too.
The method - hasAllowRule was revised. If a action -read or update was approved, all ticket count of allow rule entries for this action will minus one if the entries have ticket count number (not null).
The two hasPermission methods were rewritten. Some logic bugs were fixed. Now user, public and group will not be checked speratedly, but they will be check together as string array. In order to do this, private methods isAccessDocument, containDocumentOwner, isAllowFirst, hasAllowRule, hasExplicitDenyRule, hasImplicitDenyRule, and createUsersPackage were added.
In method transformXMLDocument, if no style sheet registered was found for the input document, the document will be send back, rather than use util.DebugMessge to print.
Only delete some incorrect comment.
When user request a data package, the old version documents would be exported. Only export the request one.
During the export function. Every document will be check if the user has the permission to read or not.
The feature of check permission before Metacat handle a "read" action. If user doesn't have permission, its request will be rejected.After creating a DocumentImpl object. A method named hasReadPermission in that class will be called to make sure the user has permission to read it.
A method named hasReadPermission was added. The method will check if a user has permission toread a xml document.
A new method named hasPermissionToExportPackage was added. So when MetaCat handle export action, it will check if user has permission to read the data package. If it has, MetaCat will export a zip output stream to it. Otherwise, MetaCat will be through a exception.
Code to handle "read" permission was changed in hasPermission method. The old code used old way to look up the public_access field in xml_documents table.
A new action named export was add to it. This action will export a zip output stream for a data package. In the zip output stream, meta data documents, data files and a html summary file are include. The stucture will looks like:package----/metadata/metadata docments...
Two metacat util methods were add. One is getDocIdFromString and the other is getVersionFromString. They output a docid and revision if a string like str1.str2.str3. were passed to them.
A method named transformXmlDocument were overload. It transform an XML document to StringWriter using the stylesheet reference from the db.
A public method named getZippedPackage() and other relative private methods were add to this class. The public method can give a zip output stream if a docid and other parameters were passed to it.
Some code format problem was fixed.
The bug was fixed.After a referral exception happend, we should set enviroment properties again before creating a contex. These environment properties include PROVIDER_URL, SECURITY_PRINCIPLE, SECURITY_CREDENTIALS, REFERRAL, and INITIAL_CONTEXT_FACOTRY. Otherwise, you couldn't get a naming exception.
Authentication bug was fixed (bug 408).However, it needs to test if referral cotaining a referral.
Please check it.
In order to fix bug 408 (authentication), some important variables' valueswere followed.
Set the qformat parameter so the stylesheets can use it for conditionalprocessing.