Copyright Microsoft Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
/** * Copyright Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
package com.microsoft.azure.storage; import java.util.Date;
Represents a shared access policy, which specifies the start time, expiry time, and permissions for a shared access signature.
/** * Represents a shared access policy, which specifies the start time, expiry time, and permissions for a shared access * signature. */
public abstract class SharedAccessPolicy {
The expiry time for a shared access signature associated with this shared access policy.
/** * The expiry time for a shared access signature associated with this shared access policy. */
private Date sharedAccessExpiryTime;
The start time for a shared access signature associated with this shared access policy.
/** * The start time for a shared access signature associated with this shared access policy. */
private Date sharedAccessStartTime;
Creates an instance of the SharedAccessPolicy class.
/** * Creates an instance of the <code>SharedAccessPolicy</code> class. */
public SharedAccessPolicy() { // Empty Default Constructor. }
Gets the expiry time for a shared access signature associated with this shared access policy.
Returns:A java.util.Date object which contains the shared access signature expiry time.
/** * Gets the expiry time for a shared access signature associated with this shared access policy. * * @return A <code>java.util.Date</code> object which contains the shared access signature expiry time. */
public Date getSharedAccessExpiryTime() { return this.sharedAccessExpiryTime; }
Gets the start time for a shared access signature associated with this shared access policy.
Returns:A java.util.Date object which contains the shared access signature start time.
/** * Gets the start time for a shared access signature associated with this shared access policy. * * @return A <code>java.util.Date</code> object which contains the shared access signature start time. */
public Date getSharedAccessStartTime() { return this.sharedAccessStartTime; }
Sets the expiry time for a shared access signature associated with this shared access policy.
Params:
  • sharedAccessExpiryTime – A java.util.Date object which represents the expiry time to set for the shared access signature.
/** * Sets the expiry time for a shared access signature associated with this shared access policy. * * @param sharedAccessExpiryTime * A <code>java.util.Date</code> object which represents the expiry time to set for the shared access signature. */
public void setSharedAccessExpiryTime(final Date sharedAccessExpiryTime) { this.sharedAccessExpiryTime = sharedAccessExpiryTime; }
Sets the start time for a shared access signature associated with this shared access policy.
Params:
  • sharedAccessStartTime – A java.util.Date object which represents the start time to set for the shared access signature.
/** * Sets the start time for a shared access signature associated with this shared access policy. * * @param sharedAccessStartTime * A <code>java.util.Date</code> object which represents the start time to set for the shared access signature. */
public void setSharedAccessStartTime(final Date sharedAccessStartTime) { this.sharedAccessStartTime = sharedAccessStartTime; }
Converts this shared access policy's permissions to a string.
Returns:A String which represents the shared access permissions.
/** * Converts this shared access policy's permissions to a string. * * @return A <code>String</code> which represents the shared access permissions. */
public abstract String permissionsToString();
Sets shared access permissions using the specified permissions string.
Params:
  • value – A String which represents the shared access permissions.
/** * Sets shared access permissions using the specified permissions string. * * @param value * A <code>String</code> which represents the shared access permissions. **/
public abstract void setPermissionsFromString(final String value); }