Sunday, 9 September 2018

dfc - dump all attribute of object

package dctm1;

import java.util.Scanner;

import com.documentum.com.DfClientX;
import com.documentum.com.IDfClientX;
import com.documentum.fc.client.DfServiceException;
import com.documentum.fc.client.IDfClient;
import com.documentum.fc.client.IDfSession;
import com.documentum.fc.client.IDfSessionManager;
import com.documentum.fc.client.IDfSysObject;
import com.documentum.fc.common.DfException;
import com.documentum.fc.common.IDfId;
import com.documentum.fc.common.IDfLoginInfo;

public class dumpattribute extends kavidoc {

public static void main(String[] args) throws DfException {
// TODO Auto-generated method stub
IDfClientX cx=new DfClientX();
IDfClient c=cx.getLocalClient();
IDfSessionManager sm=c.newSessionManager();
IDfLoginInfo login=cx.getLoginInfo();
login.setUser(uname);
login.setPassword(pwd);
sm.setIdentity(docbase, login);
IDfSession s=sm.getSession(docbase);
if(s!=null)
{
System.out.println("Session obtained succesfull");
System.out.println(s);

}
else
{
System.out.println("Login failed");
}
Scanner scan=new Scanner(System.in);
System.out.println("Enter the object id to dump attribute:");
String objid=scan.nextLine();
StringBuffer bf=new StringBuffer("");
IDfId idObj = s.getIdByQualification("dm_sysobject where r_object_id='" + objid + "'");
IDfSysObject sysObj = (IDfSysObject) s.getObject(idObj);
bf.append(sysObj.dump());
System.out.println("Output");
System.out.println(bf.toString());
}

}


////

Session obtained succesfull
com.documentum.fc.client.DfSession@defa1a
Enter the object id to dump attribute:
0900113c80003125
Output
USER ATTRIBUTES

  object_name                : hello.pdf
  title                      : 
  subject                    : 
  authors                  []: <none>
  keywords                 []: <none>
  resolution_label           : 
  owner_name                 : karthi
  owner_permit               : 7
  group_name                 : docu
  group_permit               : 5
  world_permit               : 3
  log_entry                  : 
  acl_domain                 : karthi
  acl_name                   : dm_4500113c80000102
  language_code              : 

SYSTEM ATTRIBUTES

  r_object_id                : 0900113c80003125
  r_object_type              : dm_document
  r_creation_date            : 9/9/2018 20:21:26
  r_modify_date              : 9/9/2018 20:21:26
  r_modifier                 : karthi
  r_access_date              : nulldate
  r_composite_id           []: <none>
  r_composite_label        []: <none>
  r_component_label        []: <none>
  r_order_no               []: <none>
  r_link_cnt                 : 0
  r_link_high_cnt            : 0
  r_assembled_from_id        : 0000000000000000
  r_frzn_assembly_cnt        : 0
  r_has_frzn_assembly        : F
  r_is_virtual_doc           : 0
  r_page_cnt                 : 1
  r_content_size             : 1016643
  r_lock_owner               : 
  r_lock_date                : nulldate
  r_lock_machine             : 
  r_version_label         [0]: 1.0
                          [1]: CURRENT
  r_immutable_flag           : F
  r_frozen_flag              : F
  r_has_events               : F
  r_creator_name             : karthi
  r_is_public                : T
  r_policy_id                : 0000000000000000
  r_resume_state             : 0
  r_current_state            : 0
  r_alias_set_id             : 0000000000000000
  r_full_content_size        : 1016643
  r_aspect_name            []: <none>

APPLICATION ATTRIBUTES

  a_application_type         : 
  a_status                   : 
  a_is_hidden                : F
  a_retention_date           : nulldate
  a_archive                  : F
  a_compound_architecture    : 
  a_link_resolved            : F
  a_content_type             : pdf
  a_full_text                : T
  a_storage_type             : filestore_01
  a_special_app              : 
  a_effective_date         []: <none>
  a_expiration_date        []: <none>
  a_publish_formats        []: <none>
  a_effective_label        []: <none>
  a_effective_flag         []: <none>
  a_category                 : 
  a_is_template              : F
  a_controlling_app          : 
  a_extended_properties    []: <none>
  a_is_signed                : F
  a_last_review_date         : nulldate

INTERNAL ATTRIBUTES

  i_is_deleted               : F
  i_reference_cnt            : 1
  i_has_folder               : T
  i_folder_id             [0]: 0b00113c80003112
  i_contents_id              : 0600113c80002d14
  i_cabinet_id               : 0c00113c80002921
  i_antecedent_id            : 0000000000000000
  i_chronicle_id             : 0900113c80003125
  i_latest_flag              : T
  i_branch_cnt               : 0
  i_direct_dsc               : F
  i_is_reference             : F
  i_retain_until             : nulldate
  i_retainer_id            []: <none>
  i_is_replica               : F
  i_vstamp                   : 0

No comments:

Post a Comment