// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.communication.notifications.new_notifications.RemoteActions; import android.content.Context; import android.os.Parcel; import com.olio.communication.messages.MessagePayload; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; // Referenced classes of package com.olio.communication.notifications.new_notifications.RemoteActions: // RemoteAction public class RemoteActionBatch extends RemoteAction { public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() { public MessagePayload createFromParcel(Parcel parcel) { return RemoteAction.unpackParcel(parcel); } public volatile Object createFromParcel(Parcel parcel) { return createFromParcel(parcel); } public MessagePayload[] newArray(int i) { return new RemoteActionBatch[i]; } public volatile Object[] newArray(int i) { return newArray(i); } }; private static final long serialVersionUID = 440L; private RemoteAction mRemoteActions[]; private boolean mStopOnFail; public RemoteActionBatch() { } public RemoteActionBatch(RemoteAction aremoteaction[]) { mRemoteActions = aremoteaction; } public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } else { RemoteActionBatch remoteactionbatch = (RemoteActionBatch)obj; return (new EqualsBuilder()).appendSuper(super.equals(obj)).append(mRemoteActions, remoteactionbatch.mRemoteActions).isEquals(); } } public RemoteAction[] getRemoteActions() { return mRemoteActions; } public int hashCode() { return (new HashCodeBuilder(17, 37)).appendSuper(super.hashCode()).append(mRemoteActions).toHashCode(); } public boolean isStopOnFail() { return mStopOnFail; } public boolean runAction(Context context, Long long1) { if (mRemoteActions != null && mRemoteActions.length > 0) { int j = 1; RemoteAction aremoteaction[] = mRemoteActions; int k = aremoteaction.length; for (int i = 0; i < k; i++) { RemoteAction remoteaction = aremoteaction[i]; boolean flag = remoteaction.runAction(context, long1); if (mStopOnFail && !flag) { logResult(context, long1, flag, String.format("Batch execution interrupted in action #%s - %s", new Object[] { Integer.valueOf(j), remoteaction.getClass().getSimpleName() })); return false; } j++; } logResult(context, long1, true, String.format("%s actions executed", new Object[] { Integer.valueOf(j) })); return true; } else { logResult(context, long1, false, "Received batch is empty"); return false; } } public void setRemoteActions(RemoteAction aremoteaction[]) { mRemoteActions = aremoteaction; } public void setStopOnFail(boolean flag) { mStopOnFail = flag; } }