* @param {string} productOrPublicationId * @param {boolean} locked
(productOrPublicationId, locked)
| 267 | * @param {boolean} locked |
| 268 | */ |
| 269 | constructor(productOrPublicationId, locked) { |
| 270 | let publicationId, productId, label; |
| 271 | const div = productOrPublicationId.indexOf(':'); |
| 272 | if (div != -1) { |
| 273 | // The argument is a product id. |
| 274 | productId = productOrPublicationId; |
| 275 | publicationId = productId.substring(0, div); |
| 276 | label = productId.substring(div + 1); |
| 277 | } else { |
| 278 | // The argument is a publication id. |
| 279 | publicationId = productOrPublicationId; |
| 280 | productId = null; |
| 281 | label = null; |
| 282 | } |
| 283 | |
| 284 | /** @private @const {string} */ |
| 285 | this.publicationId_ = publicationId; |
| 286 | /** @private @const {?string} */ |
| 287 | this.productId_ = productId; |
| 288 | /** @private @const {?string} */ |
| 289 | this.label_ = label; |
| 290 | /** @private @const {boolean} */ |
| 291 | this.locked_ = locked; |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * @return {string} |
nothing calls this directly
no outgoing calls
no test coverage detected