Home

 

Delete unnecessary links

Use these commands to delete unnecessary links for your Bookmarks deployment – for example, to remove offensive content. These commands do not require a file check out or a server restart to take effect.


Use the LinkService command to remove links from a Bookmarks database. You can delete links in two ways. You can use the UID (which you can obtain by right-clicking on the bookmark, clicking "Copy link location" and pasting into a text editor, and then copying the 36 alphanumeric characters (the UID) that occur after "link="). Alternatively, you can use the e-mail address of the person that created the link and URL of the link.

  1. See the topic Running Bookmarks administrative commands for information on using administrative commands.

  2. Use the following form for the LinkService command:

      LinkService.<command_name>(<arguments>)
      

  3. You can delete links in two ways - using the UID (which you can obtain by right-clicking on the bookmark, clicking "Copy link location" and pasting into a text editor, and then copying the 36 alphanumeric characters (the UID) that occur after "link=") or, alternately, by using the e-mail address of the person that created the link and URL of the link.

    Option Description
    LinkService.deleteLinkByUID('[UID]')

    Deletes a single bookmark matching the UID specified.

    [UID] is the UID of the bookmark.

    When creating the text file, enter one UID per line.

    There should be no output in wsadmin console if successful. Example:

      LinkService.deleteLinkByUID("0A5G
       09219578A357F378C607680F7600000B")
      

    LinkService.deleteLinkByUIDBatch('[fileName]')

    Deletes a list of bookmarks matching the UIDs specified.

    [fileName] is the name of a text file containing the UIDs to be deleted. Create this text file and save it in a local (local to the server where you are running the wsadmin processor).

    There should be no output in wsadmin console. Be sure to check logs as UIDs that were not successfully deleted will be logged. Example:

      LinkService.deleteLinkByUIDBatch
       ("/opt/Bookmarks/badlinks.txt")
      

    If you are using DB2 as your database, you can create the batch file for deleting all of the bookmarks associated with a user this way:

    1. Open the DB2 Control Center.

    2. From the command editor, connect to the Bookmarks database.

    3. Get the user's person ID from the person table: select person_id from dogear.person where email='someEmail@company.com'

    4. Get the user's bookmark link IDs: select link_id from dogear.link where person='personId'

    5. Based on the results returned, highlight a group of bookmark links. We suggest 100 to 200 links at a time.

    6. Click on Selected and Export.

    7. Make sure the option No character delimiter is selected and export to a text file on your file system

    8. Run the LinkService.deleteLinkByUIDBatch command with the file created.
    LinkService.deleteLinkByPersonURL('[email]', '[href]')

    Deletes a single bookmark matching the e-mail and URL specified.

    [email] is the address of the person who created the bookmark.

    [href] is the URL of the bookmark you want to delete. It is important to input the exact href including the protocol.

    There should be no output in the wsadmin console if successful. Example:

      LinkService.deleteLinkByPersonURL
       ("jane_doe@acme.com",
       "http://bad.url.com)
      

    LinkService.deleteLinkByPersonURLBatch('[fileName]')

    Deletes multiple bookmarks matching specified e-mail addresses and URLs.

    [fileName] is the filename containing the addresses and URL to be deleted. Create this text file and save it in a local (local to the server where you are running the wsadmin processor).

    This file must be formatted with [email] <space> [href] on each line. For example, a single line would look as follows:

    email@ibm.com http://www.theurl.com Note the single whitespace character between the address and the URL.

    [email] is the email address of the person with the bookmark.

    [href] is the URL of the bookmark. It is important to input the exact href including the protocol.

    There should be no output in the wsadmin console. Be sure to check logs as addresses and URLs matching the bookmark that was not successfully deleted will be logged. Example:

      LinkService.deleteLinkByPersonURL
       Batch("c:/Bookmarks/delete.txt")
      


Administer Bookmarks


+

Search Tips   |   Advanced Search