ניהול עניינים

עניין הוא מאגר של כל הנתונים הקשורים לנושא ספציפי, כמו תיק בהתדיינות או חקירה. עניין כולל:

  • שאילתות חיפוש שמורות
  • החזקות
  • חשבונות שאיתם העניין משותף
  • ייצוא קבוצות
  • מסלול ביקורת

כדי לעבוד עם המשאבים של Vault, החשבון צריך לקבל את ההרשאות הנדרשות ל-Vault וגישה לעניין. כדי לגשת לעניין, צריך שהחשבון יצר את העניין, אם העניין משותף איתו או צריכה להיות לו ההרשאה הצגת כל העניינים.

המצבים הרלוונטיים של עניין מסוים:

ארץתיאור
פתיחההעניין פעיל וניתן ליצור החזקות לצורך משפטי, להריץ חיפושים ולייצא נתונים בתוכו.
סגורהבדרך כלל כשהבדיקה מסתיימת, העניין נסגר.

תמיד אפשר לפתוח מחדש עניינים שנסגרו.

נמחקהניתן למחוק עניין כך שהוא לא יהיה זמין לגמרי.

עניין שנמחק נשאר באשפה למשך כ-30 יום, ובמשך הזמן הזה ניתן לשחזר אותו. אחרי התקופה הזו, העניין יימחק באופן סופי.

מחזור החיים של עניינים

יצירת עניין

בדוגמה הבאה נוצר עניין חדש עם השם והתיאור שצוינו.

Java

Matter matter = new Matter();
matter.setName("Matter Name");
matter.setDescription("Matter Description");
Matter createdMatter = client.matters().create(matter).execute();
 

Python

def create_matter(service):
  matter_content = {
      'name': 'Matter Name',
      'description': 'Matter Description',
  }
  matter = service.matters().create(body=matter_content).execute()
  return matter

מציאת עניין

יש שתי תצוגות של עניין: בסיסי (ברירת מחדל) ומלא. התצוגה המלאה מוסיפה הרשאות עניינים לתצוגה הבסיסית.

הדוגמה הבאה מאחזרת את העניין שצוין.

Java

client.matters().get(matterId).execute(); // Returns BASIC view.
client.matters().get(matterId).setView("BASIC").execute();
client.matters().get(matterId).setView("FULL").execute();

Python

matter_id = getMatterId()
service.matters().get(matterId=matter_id).execute(); // Returns BASIC view.
service.matters().get(matterId=matter_id, view='BASIC').execute();
service.matters().get(matterId=matter_id, view='FULL').execute();

הצגת רשימת העניינים

בדוגמה הבאה ניתן לראות איך להציג רשימה של כל העניינים הפתוחים, הסגורים והנמחקים (עד 100 כברירת המחדל לכל בקשה).

Java

List mattersList = client.matters().list().execute().getMatters();

Python

mattersList = client.matters().list().execute()

בדוגמה הבאה ניתן לראות איך להציג רשימה של כל העניינים הפתוחים, הסגורים והנמחקים בבקשות מרובות.

Java

ListMattersResponse firstPageResponse = client.matters().list().setPageSize(20).execute();
 
String nextPageToken = firstPageResponse.getNextPageToken());
if (nextPageToken != null) {
  client.matters().list().setPageToken(nextPageToken).setPageSize(20).execute();
}

Python

list_response1 = service.matters().list(
        view='FULL', pageSize=10).execute()
for matter in list_response1['matters']:
    print(matter)

if ‘nextPageToken’ in list_response1:
    list_response2 = service.matters().list(
        pageSize=10, pageToken=list_response1['nextPageToken']).execute()
    for matter in list_response2['matters']:
      print(matter)

בדוגמה הבאה ניתן לראות איך להציג רשימה של עניינים שנמצאים במדינה מסוימת.

Java

// Only get open matters.
List openMattersList = client.matters().list().setState("OPEN").execute().getMatters();

// Only get closed matters.
List closedMattersList = client.matters().list().setState("CLOSED").execute().getMatters();

// Only get deleted matters.
List deletedMattersList = client.matters().list().setState("DELETED").execute().getMatters();

Python

# Only get open matters.
openMattersList = client.matters().list(
    state='OPEN').execute()

# Only get closed matters.
closedMattersList = client.matters().list(
    state='CLOSED').execute()

# Only get deleted matters.
deletedMattersList = client.matters().list(
    state='DELETED').execute()

עדכון עניין

בדוגמה הבאה מתבצע עדכון של השם והתיאור של עניין.

Java

String matterId = "matterId";
Matter matter = new Matter().setName("New Name").setDescription("New Description");
vault.matters().update(matterId, matter).execute();

Python

def update_matter(service, matter_id):
    wanted_matter = {
        'name': 'New Matter Name',
        'description': 'New Description'
    }
    updated_matter = service.matters().update(
        matterId=matter_id, body=wanted_matter).execute()
    return updated_matter

סגירת עניין

בדוגמה הבאה אפשר לראות איך לסגור עניין.

Java

String matterId = "matterId";
// If the matter still has holds, this operation will fail.
client.matters().close(matterId, new CloseMatterRequest()).execute();
 

Python

def close_matter(service, matter_id):
    close_response = service.matters().close(
        matterId=matter_id, body={}).execute()
    return close_response['matter']
 

מחיקה, ביטול מחיקה ופתיחה מחדש של עניין

בדוגמה הבאה אפשר לראות איך למחוק, לבטל מחיקה או לפתוח מחדש עניין.

Java

Matter matter = client.matters().get(matterId).execute();
 
// Delete the matter.
client.matters().delete(matter.getMatterId());
// Undelete the matter.
client.matters().undelete(matter.getMatterId(), new UndeleteRequest());
// Reopen the matter.
client.matters().reopen(matter.getMatterId(), new ReopenMatterRequest());
 

Python

def reopen_matter(service, matter_id):
    reopen_response = service.matters().reopen(
        matterId=matter_id, body={}).execute()
    return reopen_response['matter']

def delete_matter(service, matter_id):
    service.matters().delete(matterId=matter_id).execute()
    return get_matter(matter_id)

def undelete_matter(service, matter_id):
    undeleted_matter = service.matters().undelete(
        matterId=matter_id, body={}).execute()
    return undeleted_matter

 

הרשאות של עניינים

לכל עניין יש קבוצת הרשאות שקובעת מי יכול לגשת אליו או לערוך אותו. כדי לראות את זה יש תצוגה מלאה של עניין מסוים.

Java

String matterId = "Matter Id";
String accountId = "Account Id";
 
// List permissions for a matter.
Matter matter = client.matters().get(matterId).setView("FULL").execute();
List matterPermissions = matter.getMatterPermissions();
 
// Add a user to the permission set.
client
    .matters()
    .addPermissions(matterId)
    .setMatterPermissionAccountId(accountId)
    .setMatterPermissionRole("COLLABORATOR")
    .execute();
 
// Remove a user from the permission set.
client
    .matters()
    .removePermissions(matterId)
    .setAccountId(accountId)
    .execute();

Python

def list_matter_permission(service, matter_id):
    matter = service.matters().get(matterId=matter_id, view='FULL').execute()
    return matter['matterPermissions']
 
def add_matter_permission(service, matter_id, account_id):
    permission = service.matters().addPermissions(
        matterId=matter_id,
        matterPermission_accountId=account_id,
        matterPermission_role='COLLABORATOR',
        sendEmails='False',
        ccMe='False').execute()
    return permission

def remove_matter_permission(service, matter_id, account_id):
    service.matters().removePermissions(
        matterId=matter_id, accountId=account_id).execute()