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

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

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

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

בעניין יש את המצבים הבאים:

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

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

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

עניין שנמחק יישאר באשפה למשך כ-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

 

הרשאות בתקן 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()