~ubuntu-branches/ubuntu/trusty/nordugrid-arc/trusty-proposed

« back to all changes in this revision

Viewing changes to src/hed/libs/common/UserConfig.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2013-11-29 13:39:10 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20131129133910-altaxrfowczzl2ev
Tags: 4.0.0-1
4.0.0 Release (Closes: #715131) (LP: #1049798)

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
   * - cacertificatepath / CACertificatePath(const std::string&)
138
138
   * - timeout / Timeout(int)
139
139
   * - joblist / JobListFile(const std::string&)
 
140
   * - joblisttype / JobListType(const std::string&)
140
141
   * - verbosity / Verbosity(const std::string&)
141
142
   * - brokername / Broker(const std::string&) or Broker(const std::string&, const std::string&)
142
143
   * - brokerarguments / Broker(const std::string&) or Broker(const std::string&, const std::string&)
143
 
   * - bartender / Bartender(const std::list<URL>&)
144
144
   * - vomsserverpath / VOMSESPath(const std::string&)
145
145
   * - username / UserName(const std::string&)
146
146
   * - password / Password(const std::string&)
457
457
    /// Set path to job list file
458
458
    /**
459
459
     * The method takes a path to a file which will be used as the job
460
 
     * list file for storing and reading job information. If the
461
 
     * specified path \a path does not exist a empty job list file will
462
 
     * be tried created. If creating the job list file in any way fails
463
 
     * \a false will be returned and a ::ERROR message will be reported.
464
 
     * Otherwise \a true is returned. If the directory containing the
465
 
     * file does not exist, it will be tried created. The method will
466
 
     * also return \a false if the file is not a regular file.
 
460
     * list file for storing and reading job information. This method always
 
461
     * return true.
467
462
     *
468
463
     * The attribute associated with this setter method is 'joblist'.
469
464
     *
470
465
     * @param path the path to the job list file.
471
 
     * @return If the job list file is a regular file or if it can be
472
 
     *         created \a true is returned, otherwise \a false is
473
 
     *         returned.
 
466
     * @return true is always returned.
474
467
     * @see JobListFile() const
475
468
     **/
476
469
    bool JobListFile(const std::string& path);
484
477
     * @see JobListFile(const std::string&)
485
478
     **/
486
479
    const std::string& JobListFile() const { return joblistfile; }
 
480
    
 
481
    /// Set type of job storage
 
482
    /**
 
483
     * Possible storage types are BDB and XML. This method always return true.
 
484
     * 
 
485
     * The attribute associated with this setter method is 'joblisttype'.
 
486
     * 
 
487
     * @param type of job storage
 
488
     * @return true is always returned.
 
489
     * @see JobListType()
 
490
     **/
 
491
    bool JobListType(const std::string& type);
 
492
    /// Get type of job storage
 
493
    /**
 
494
     * @return The type of job storage is returned.
 
495
     * @see JobListType(const std::string&)
 
496
     **/
 
497
    const std::string& JobListType() const { return joblisttype; }
487
498
 
488
499
    /// Set timeout
489
500
    /**
592
603
     **/
593
604
    const std::pair<std::string, std::string>& Broker() const { return broker; }
594
605
 
595
 
    /// Set bartenders, used to contact Chelonia
596
 
    /**
597
 
     * Takes as input a vector of Bartender URLs.
598
 
     *
599
 
     * The attribute associated with this setter method is 'bartender'.
600
 
     *
601
 
     * @param urls is a list of URL object to be set as bartenders.
602
 
     * @return This method always returns \c true.
603
 
     * @see AddBartender(const URL&)
604
 
     * @see Bartender() const
605
 
     **/
606
 
    bool Bartender(const std::vector<URL>& urls) { bartenders = urls; return true; }
607
 
    /// Set bartenders, used to contact Chelonia
608
 
    /**
609
 
     * Takes as input a Bartender URL and adds this to the list of
610
 
     * bartenders.
611
 
     *
612
 
     * @param url is a URL to be added to the list of bartenders.
613
 
     * @see Bartender(const std::list<URL>&)
614
 
     * @see Bartender() const
615
 
     **/
616
 
    void AddBartender(const URL& url) { bartenders.push_back(url); }
617
 
    /// Get bartenders
618
 
    /**
619
 
     * Returns a list of Bartender URLs
620
 
     *
621
 
     * @return The list of bartender URL objects is returned.
622
 
     * @see Bartender(const std::list<URL>&)
623
 
     * @see AddBartender(const URL&)
624
 
     **/
625
 
    const std::vector<URL>& Bartender() const { return bartenders; }
626
 
 
627
606
    /// Set path to file containing VOMS configuration
628
607
    /**
629
608
     * Set path to file which contians list of VOMS services and
692
671
     **/
693
672
    const std::string& Password() const { return password; }
694
673
 
 
674
    /// Set credentials.
 
675
    /**
 
676
     * For code which does not need credentials stored in files, this method
 
677
     * can be used to set the credential as a string stored in memory.
 
678
     *
 
679
     * @param cred The credential represented as a string
 
680
     */
 
681
    void CredentialString(const std::string& cred) { credentialString = cred; }
 
682
    /// Get credentials.
 
683
    /**
 
684
     * Returns the string representation of credentials previously set by
 
685
     * CredentialString(const std::string&).
 
686
     *
 
687
     * @return String representation of credentials
 
688
     */
 
689
    const std::string& CredentialString() const { return credentialString; }
 
690
 
695
691
    /// Set path to user proxy
696
692
    /**
697
693
     * This method will set the path of the user proxy. Note that the
1214
1210
     * configuration file.
1215
1211
     **/
1216
1212
    static const std::string EXAMPLECONFIG;
 
1213
    /// Path to default job list file
 
1214
    /**
 
1215
     * The \a JOBLISTFILE variable specifies the default path to the job list
 
1216
     * file used by the ARC job management tools. The job list file is located
 
1217
     * in the directory specified by the ARCUSERDIRECTORY variable with name
 
1218
     * 'jobs.dat'.
 
1219
     * @see ARCUSERDIRECTORY
 
1220
     **/
 
1221
    static const std::string JOBLISTFILE;
1217
1222
 
1218
1223
    /// Default timeout in seconds
1219
1224
    /**
1250
1255
 
1251
1256
 
1252
1257
    std::string joblistfile;
 
1258
    std::string joblisttype;
1253
1259
 
1254
1260
    int timeout;
1255
1261
 
1264
1270
    std::list<std::string> rejectDiscoveryURLs;
1265
1271
    std::list<std::string> rejectManagementURLs;
1266
1272
 
1267
 
    // Vector needed for random access.
1268
 
    std::vector<URL> bartenders;
1269
 
 
 
1273
    std::string credentialString;
1270
1274
    std::string proxyPath;
1271
1275
    std::string certificatePath;
1272
1276
    std::string keyPath;