Home

 

Using administrative commands

The commands described here manipulate managed Java™ beans (MBeans) to make changes to various operational data on a Bookmarks server.

Use wsadmin


These commands are tools you can use to control various aspects of the Bookmarks environment and its users. These commands do not require a file check out or a server restart to take effect.These commands are case-sensitive and take the following form:

  1. To update the Bookmarks database - If there is an LDAP change that requires member IDs in the Bookmarks database to be updated, use the PersonService command. For example, if users are migrated to a new LDAP or a user is removed and re-entered in the LDAP and their unique identifier changes, these users will not be able to login to Bookmarks until the user record is updated with the PersonService MBean. The following methods are available to make these database changes:

    Option Description
    PersonService.updateAllMemberIds()

    Updates all member IDs in the Bookmarks database. This service queries the LDAP server for each user by email to retrieve the updated memberId (unique identifier).

    Update time will vary, depending on the number of people in your DB. On average, 8 minutes per 500 users is the norm. For large databases, run this process overnight.

    There should be no output in wsadmin console. Be sure to check the SystemOut.log file as email addresses of Bookmarks users that were not successfully updated will be logged there.

    PersonService.updateMemberIdBatch('[fileName]')

    Updates Member IDs using e-mail addresses stored in a text file. This command expects a file with one e-mail address on each line.

    Create this text file and save it in a local directory (local to the server where you are running the wsadmin processor). Example:

      PersonService.updateMemberIdBatch(
       "/opt/Bookmarks/update.txt")
      

    PersonService.updateMemberId('[email]')

    This command updates a Single Member Id. This command expects a single e-mail as input.

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

      PersonService.updateMemberId(
       "john_smith@acme.com")
      

  2. To remove offensive content - When you need to delete offensive or unwanted links from the database, you use the LinkService command. You can delete links in two ways - using the UID (which can be obtained by right-clicking on the bookmark, click on "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 email 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")
      

    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")
      

  3. To manage IP ranges - UrlService commands are used when the internal IP ranges of a company change. These commands operate on the Bookmarks database and can recalculate whether an existing link is internal or not, based on the IP ranges that are updated using the DogearCellConfig.addIpRange or DogearCellConfig.removeIpRange commands.

    Also, it is a good idea to delete the contents of the Favicons subdirectory. The "favicons" that appear next to each Bookmarks link are cached in the favicon directory, and if you delete the contents of this directory, the icons that appear next to each link will be updated.

    After making IP range configuration updates you need to restart Bookmarks for changes to take effect. Then run these commands to process URL changes. UrlService commands include:

    Option Description
    UrlService.reprocessIntranetAddress('[href]')

    [href] is exact URL whose intranet range is to be reprocessed .

    Example Usage: UrlService.reprocessIntranetAddress ('http://www.ibm.com')

    There should be no output in wsadmin console if successful.

    UrlService.reprocessIntranetAddressBatch('[fileName]')

    [fileName] is the name of the file containing URLs to be recalculated.

    Create this text file and save it in a local (local to the server where you are running the wsadmin processor).

    This command expects a file with URLs to be recalculated on each line. Enter a single URL on each line of the file.

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

      UrlService.reprocessIntranet
       AddressBatch(/opt/test.txt")
      

    UrlService.reprocessIntranetAddresses()

    This command should be used if there have been no major changes to the network topology and the only goal is to process an update to the configured intranet IP ranges.

    This command reprocesses the intranet status of all Bookmarks URLs by comparing a locally cached version of its IP address to the intranet IP ranges provided in the Bookmarks cell-level configuration document.

    This command is much quicker than UrlService.recalculateIPAddresses , which not only checks the current intranet settings but also regathers the IP address for every URL in the database.

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

      UrlService.reprocessIntranet
       Addresses()
      

    UrlService.recalculateIPAddress('[href]')

    [href] is exact URL whose intranet range is to be recalculated. Example Usage:

      UrlService.recalculateIPAddress(
       'http://www.ibm.com') 
      

    If you are only re-validating the intranet status of URLs because of a change to intranet IP tables, then UrlService.reprocessIntranetAddress('[href]') should be invoked.

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

      UrlService.recalculateIPAddress(
       "http://www.ibm.com")
      

    UrlService.recalculateIPAddressesBatch('[fileName]')

    [fileName] is the name of the file containing URLs to be recalculated.

    This command expects a file with the URLs to be recalculated on each line. Enter a single URL on each line of the file.

    If you are only re-validating the intranet status of URLs because of a change to intranet IP tables, then UrlService.reprocessIntranetAddressesBatch('[fileName]') should be invoked.

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

      UrlService.recalculateIPAddressBatch(
       "c:/Bookmarks/recalc.txt")
      

    UrlService.recalculateIPAddresses()

    This command recalculates the IP addresses of all the URLs in the database. It works by updating the locally cached copy of the IP address for each URL.

    Running this command can be time consuming for large sized databases. For each URL in the database, this command will connect to and validate the IP address from the DNS. It takes an average of 8 minutes per 500 URLs, depending on the speed of the network connection.

    If you are simply re-validating the intranet status of URLs because of a change to intranet IP tables, use the UrlService.reprocessIntranetAddresses() command to speed the process.

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

      UrlService.recalculateIPAddresses()
      


Running Bookmarks administrative commands


+

Search Tips   |   Advanced Search